{"action":"created","comment":{"url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/comments/54358113","id":54358113,"diff_hunk":"@@ -0,0 +1,89 @@\n+package bacon.john.bitcoinpricewatch;\n+\n+import android.content.Intent;\n+import android.os.Bundle;\n+import android.support.v4.app.FragmentActivity;\n+\n+import bacon.john.bitcoinpricewatch.bitcoin.BitcoinCurrencyManager;\n+import bacon.john.bitcoinpricewatch.bitcoin.BitcoinCurrencyModel;\n+import bacon.john.bitcoinpricewatch.localstorage.LocalStorageService;\n+\n+import java.util.List;\n+\n+/**\n+ * An activity representing a list of Currencies. This activity\n+ * has different presentations for handset and tablet-size devices. On\n+ * handsets, the activity presents a list of items, which when touched,\n+ * lead to a {@link CurrencyDetailActivity} representing\n+ * item details. On tablets, the activity presents the list of items and\n+ * item details side-by-side using two vertical panes.\n+ * <p/>\n+ * The activity makes heavy use of fragments. The list of items is a\n+ * {@link CurrencyListFragment} and the item details\n+ * (if present) is a {@link CurrencyDetailFragment}.\n+ * <p/>\n+ * This activity also implements the required\n+ * {@link CurrencyListFragment.Callbacks} interface\n+ * to listen for item selections.\n+ */\n+public class CurrencyListActivity extends FragmentActivity\n+        implements CurrencyListFragment.Callbacks {\n+\n+    /**\n+     * Whether or not the activity is in two-pane mode, i.e. running on a tablet\n+     * device.\n+     */\n+    private boolean mTwoPane;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+\n+        LocalStorageService.sharedInstance().initialize(getApplicationContext());\n+\n+        setContentView(R.layout.activity_currency_list);\n+\n+        if (findViewById(R.id.currency_detail_container) != null) {\n+            // The detail container view will be present only in the\n+            // large-screen layouts (res/values-large and\n+            // res/values-sw600dp). If this view is present, then the\n+            // activity should be in two-pane mode.\n+            mTwoPane = true;","path":"app/src/main/java/bacon/john/bitcoinpricewatch/CurrencyListActivity.java","position":51,"original_position":51,"commit_id":"535bc9337b5d0ea5fde04d9dbd0a9c688e59be40","original_commit_id":"535bc9337b5d0ea5fde04d9dbd0a9c688e59be40","user":{"login":"baconja2","id":1165865,"avatar_url":"https://avatars.githubusercontent.com/u/1165865?v=3","gravatar_id":"","url":"https://api.github.com/users/baconja2","html_url":"https://github.com/baconja2","followers_url":"https://api.github.com/users/baconja2/followers","following_url":"https://api.github.com/users/baconja2/following{/other_user}","gists_url":"https://api.github.com/users/baconja2/gists{/gist_id}","starred_url":"https://api.github.com/users/baconja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconja2/subscriptions","organizations_url":"https://api.github.com/users/baconja2/orgs","repos_url":"https://api.github.com/users/baconja2/repos","events_url":"https://api.github.com/users/baconja2/events{/privacy}","received_events_url":"https://api.github.com/users/baconja2/received_events","type":"User","site_admin":false},"body":"Admittedly, leveraged a lot of boilerplate code Android Studio provided for me when I picked a master-detail UI. I understand that this works properly because of the above comment.","created_at":"2016-02-28T22:40:25Z","updated_at":"2016-02-28T22:40:25Z","html_url":"https://github.com/baconja2/bitcoin-price-watch/pull/1#discussion_r54358113","pull_request_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/comments/54358113"},"html":{"href":"https://github.com/baconja2/bitcoin-price-watch/pull/1#discussion_r54358113"},"pull_request":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1","id":61009980,"html_url":"https://github.com/baconja2/bitcoin-price-watch/pull/1","diff_url":"https://github.com/baconja2/bitcoin-price-watch/pull/1.diff","patch_url":"https://github.com/baconja2/bitcoin-price-watch/pull/1.patch","issue_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/1","number":1,"state":"open","locked":false,"title":"[And] Bitcoin Price Watch V1.0","user":{"login":"baconja2","id":1165865,"avatar_url":"https://avatars.githubusercontent.com/u/1165865?v=3","gravatar_id":"","url":"https://api.github.com/users/baconja2","html_url":"https://github.com/baconja2","followers_url":"https://api.github.com/users/baconja2/followers","following_url":"https://api.github.com/users/baconja2/following{/other_user}","gists_url":"https://api.github.com/users/baconja2/gists{/gist_id}","starred_url":"https://api.github.com/users/baconja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconja2/subscriptions","organizations_url":"https://api.github.com/users/baconja2/orgs","repos_url":"https://api.github.com/users/baconja2/repos","events_url":"https://api.github.com/users/baconja2/events{/privacy}","received_events_url":"https://api.github.com/users/baconja2/received_events","type":"User","site_admin":false},"body":"### Issue / Task At Hand\r\n\r\nWanted to create a simple Android app that pulls bitcoin price information in various currencies from https://bitcoinaverage.com/api\r\n\r\n### Solution\r\n\r\nArch Diagram found here: https://docs.google.com/drawings/d/1LDmNZxoC7ImvzIMFsZ6D2Qztp1h3uD3pN5KJPue8E5A/edit\r\n\r\n- used Volley as networking lib http://developer.android.com/training/volley/index.html\r\n- used Realm for local storage of currency data https://realm.io/docs/java/latest/\r\n- used Android Studio + Gradle\r\n\r\n### Future Considerations\r\n\r\n- learn more about animations and UI styling to improve look and feel of app as well as transitions\r\n- improve error messaging and loading indication (just using Loading... text right now)\r\n- Support database migration in case the data model changes\r\n- Support localization in multiple languages\r\n- Pull out translation from JSON to Models and vice versa into its own layer of abstraction\r\n- Unit tests\r\n\r\n### Test Cases\r\n\r\n- [x] foregrounded and backgrounded the app several times\r\n- [x] tried switching between currencies very quickly\r\n- [x] verified timer works properly to refresh currency data every 10 seconds\r\n- [x] rotated screen to verify works properly in landscape\r\n- [x] installed on nexus s to verify performance on low end devices","created_at":"2016-02-28T22:27:45Z","updated_at":"2016-02-28T22:40:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e2644c496e21d15f2d698fb74ca23b3016c2b33","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1/commits","review_comments_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1/comments","review_comment_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/1/comments","statuses_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/statuses/535bc9337b5d0ea5fde04d9dbd0a9c688e59be40","head":{"label":"baconja2:dev","ref":"dev","sha":"535bc9337b5d0ea5fde04d9dbd0a9c688e59be40","user":{"login":"baconja2","id":1165865,"avatar_url":"https://avatars.githubusercontent.com/u/1165865?v=3","gravatar_id":"","url":"https://api.github.com/users/baconja2","html_url":"https://github.com/baconja2","followers_url":"https://api.github.com/users/baconja2/followers","following_url":"https://api.github.com/users/baconja2/following{/other_user}","gists_url":"https://api.github.com/users/baconja2/gists{/gist_id}","starred_url":"https://api.github.com/users/baconja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconja2/subscriptions","organizations_url":"https://api.github.com/users/baconja2/orgs","repos_url":"https://api.github.com/users/baconja2/repos","events_url":"https://api.github.com/users/baconja2/events{/privacy}","received_events_url":"https://api.github.com/users/baconja2/received_events","type":"User","site_admin":false},"repo":{"id":52576792,"name":"bitcoin-price-watch","full_name":"baconja2/bitcoin-price-watch","owner":{"login":"baconja2","id":1165865,"avatar_url":"https://avatars.githubusercontent.com/u/1165865?v=3","gravatar_id":"","url":"https://api.github.com/users/baconja2","html_url":"https://github.com/baconja2","followers_url":"https://api.github.com/users/baconja2/followers","following_url":"https://api.github.com/users/baconja2/following{/other_user}","gists_url":"https://api.github.com/users/baconja2/gists{/gist_id}","starred_url":"https://api.github.com/users/baconja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconja2/subscriptions","organizations_url":"https://api.github.com/users/baconja2/orgs","repos_url":"https://api.github.com/users/baconja2/repos","events_url":"https://api.github.com/users/baconja2/events{/privacy}","received_events_url":"https://api.github.com/users/baconja2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baconja2/bitcoin-price-watch","description":"Bitcoin Price Watch is an Android app that allows users to view the asking price of Bitcoin in various currencies","fork":false,"url":"https://api.github.com/repos/baconja2/bitcoin-price-watch","forks_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/forks","keys_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/teams","hooks_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/hooks","issue_events_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/events{/number}","events_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/events","assignees_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/assignees{/user}","branches_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/branches{/branch}","tags_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/tags","blobs_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/refs{/sha}","trees_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/statuses/{sha}","languages_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/languages","stargazers_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/stargazers","contributors_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/contributors","subscribers_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/subscribers","subscription_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/subscription","commits_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/commits{/sha}","git_commits_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/commits{/sha}","comments_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/comments{/number}","issue_comment_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/comments{/number}","contents_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/contents/{+path}","compare_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/merges","archive_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/downloads","issues_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues{/number}","pulls_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls{/number}","milestones_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/milestones{/number}","notifications_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/labels{/name}","releases_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/releases{/id}","deployments_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/deployments","created_at":"2016-02-26T03:46:51Z","updated_at":"2016-02-26T03:46:51Z","pushed_at":"2016-02-28T22:27:45Z","git_url":"git://github.com/baconja2/bitcoin-price-watch.git","ssh_url":"git@github.com:baconja2/bitcoin-price-watch.git","clone_url":"https://github.com/baconja2/bitcoin-price-watch.git","svn_url":"https://github.com/baconja2/bitcoin-price-watch","homepage":null,"size":118,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"baconja2:master","ref":"master","sha":"1e4ec62d833584c3188237c7ff0985fa0e06bf26","user":{"login":"baconja2","id":1165865,"avatar_url":"https://avatars.githubusercontent.com/u/1165865?v=3","gravatar_id":"","url":"https://api.github.com/users/baconja2","html_url":"https://github.com/baconja2","followers_url":"https://api.github.com/users/baconja2/followers","following_url":"https://api.github.com/users/baconja2/following{/other_user}","gists_url":"https://api.github.com/users/baconja2/gists{/gist_id}","starred_url":"https://api.github.com/users/baconja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconja2/subscriptions","organizations_url":"https://api.github.com/users/baconja2/orgs","repos_url":"https://api.github.com/users/baconja2/repos","events_url":"https://api.github.com/users/baconja2/events{/privacy}","received_events_url":"https://api.github.com/users/baconja2/received_events","type":"User","site_admin":false},"repo":{"id":52576792,"name":"bitcoin-price-watch","full_name":"baconja2/bitcoin-price-watch","owner":{"login":"baconja2","id":1165865,"avatar_url":"https://avatars.githubusercontent.com/u/1165865?v=3","gravatar_id":"","url":"https://api.github.com/users/baconja2","html_url":"https://github.com/baconja2","followers_url":"https://api.github.com/users/baconja2/followers","following_url":"https://api.github.com/users/baconja2/following{/other_user}","gists_url":"https://api.github.com/users/baconja2/gists{/gist_id}","starred_url":"https://api.github.com/users/baconja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconja2/subscriptions","organizations_url":"https://api.github.com/users/baconja2/orgs","repos_url":"https://api.github.com/users/baconja2/repos","events_url":"https://api.github.com/users/baconja2/events{/privacy}","received_events_url":"https://api.github.com/users/baconja2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baconja2/bitcoin-price-watch","description":"Bitcoin Price Watch is an Android app that allows users to view the asking price of Bitcoin in various currencies","fork":false,"url":"https://api.github.com/repos/baconja2/bitcoin-price-watch","forks_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/forks","keys_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/teams","hooks_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/hooks","issue_events_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/events{/number}","events_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/events","assignees_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/assignees{/user}","branches_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/branches{/branch}","tags_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/tags","blobs_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/refs{/sha}","trees_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/statuses/{sha}","languages_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/languages","stargazers_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/stargazers","contributors_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/contributors","subscribers_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/subscribers","subscription_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/subscription","commits_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/commits{/sha}","git_commits_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/git/commits{/sha}","comments_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/comments{/number}","issue_comment_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/comments{/number}","contents_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/contents/{+path}","compare_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/merges","archive_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/downloads","issues_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues{/number}","pulls_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls{/number}","milestones_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/milestones{/number}","notifications_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/labels{/name}","releases_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/releases{/id}","deployments_url":"https://api.github.com/repos/baconja2/bitcoin-price-watch/deployments","created_at":"2016-02-26T03:46:51Z","updated_at":"2016-02-26T03:46:51Z","pushed_at":"2016-02-28T22:27:45Z","git_url":"git://github.com/baconja2/bitcoin-price-watch.git","ssh_url":"git@github.com:baconja2/bitcoin-price-watch.git","clone_url":"https://github.com/baconja2/bitcoin-price-watch.git","svn_url":"https://github.com/baconja2/bitcoin-price-watch","homepage":null,"size":118,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1"},"html":{"href":"https://github.com/baconja2/bitcoin-price-watch/pull/1"},"issue":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/1"},"comments":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/baconja2/bitcoin-price-watch/statuses/535bc9337b5d0ea5fde04d9dbd0a9c688e59be40"}}}}