{"action":"created","comment":{"url":"https://api.github.com/repos/uwblueprint/foe-android/pulls/comments/196062684","pull_request_review_id":129544083,"id":196062684,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjA2MjY4NA==","diff_hunk":"@@ -26,95 +28,159 @@\n \n public class MainActivity extends AppCompatActivity implements BeeAlertDialogListener {\n     private static final String TAG = MainActivity.class.toString();\n-    private CallbackManager callbackManager;\n-    private Callback loginCallback;\n+    private Callback emailPasswordLoginCallback;\n+    private Callback emailPasswordSignupCallback;\n     private SpinningIconDialog spinningIconDialog;\n \n     @Override\n     protected void onCreate(Bundle savedInstanceState) {\n         super.onCreate(savedInstanceState);\n         setContentView(R.layout.activity_main);\n \n-        TextView skipButton = (TextView) findViewById(R.id.skip);\n-        skipButton.setOnClickListener(new View.OnClickListener() {\n+        final EditText emailInput = (EditText) findViewById(R.id.email_input);\n+        emailInput.addTextChangedListener(new TextWatcher() {\n             @Override\n-            public void onClick(View view) {\n-                SharedPreferences sharedPref = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n-                sharedPref.edit().putBoolean(getString(R.string.preference_logged_in_as_guest), true).commit();\n-                navigateToHome();\n+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n+\n+            @Override\n+            public void onTextChanged(CharSequence s, int start, int before, int count) {\n+                resetInputFieldActiveState(emailInput);\n             }\n+\n+            @Override\n+            public void afterTextChanged(Editable s) {}\n         });\n \n-        LoginButton loginButton = (LoginButton) findViewById(R.id.login_button);\n-        loginButton.setReadPermissions(\"email\");\n-        // Other app specific specialization\n+        final EditText passwordInput = (EditText) findViewById(R.id.password_input);\n+        passwordInput.addTextChangedListener(new TextWatcher() {\n+            @Override\n+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n \n-        // Callback registration\n-        callbackManager = CallbackManager.Factory.create();\n-        loginButton.setOnClickListener(new View.OnClickListener() {\n             @Override\n-            public void onClick(View view) {\n-                spinningIconDialog = new SpinningIconDialog();\n-                spinningIconDialog.show(getFragmentManager(), \"SpinningPopup\");\n+            public void onTextChanged(CharSequence s, int start, int before, int count) {\n+                resetInputFieldActiveState(passwordInput);\n             }\n+\n+            @Override\n+            public void afterTextChanged(Editable s) {}\n         });\n-        loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {\n+\n+        Button emailLoginButton = (Button) findViewById(R.id.email_login_button);\n+        emailLoginButton.setOnClickListener(new View.OnClickListener() {\n             @Override\n-            public void onSuccess(LoginResult loginResult) {\n+            public void onClick(View view) {\n+                spinningIconDialog = new SpinningIconDialog();\n+                spinningIconDialog.show(getFragmentManager(), \"SpinningPopup\");\n \n                 BeeTrackerCaller caller = new BeeTrackerCaller();\n                 try {\n-                    Call<BeeTrackerCaller.SignupResponse> token = caller.signup(loginResult.getAccessToken());\n-                    token.enqueue(loginCallback);\n+                    String email = ((EditText) findViewById(R.id.email_input)).getText().toString();\n+                    String password = ((EditText) findViewById(R.id.password_input)).getText().toString();\n+                    Call<BeeTrackerCaller.EmailPasswordSigninResponse> call = caller.emailPasswordSignin(email, password);\n+                    call.enqueue(emailPasswordLoginCallback);\n                 } catch (IOException e) {\n                     Log.e(TAG, e.toString());\n                     e.printStackTrace();\n                     showErrorDialog(getString(R.string.error_message_login));\n+                    spinningIconDialog.dismiss();","path":"BeeTracker/app/src/main/java/com/blueprint/foe/beetracker/MainActivity.java","position":106,"original_position":106,"commit_id":"b979704ed3500de582fd9fc1aca2ce2a9ac7ad16","original_commit_id":"b979704ed3500de582fd9fc1aca2ce2a9ac7ad16","user":{"login":"luisasanmartin","id":5495724,"node_id":"MDQ6VXNlcjU0OTU3MjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5495724?v=4","gravatar_id":"","url":"https://api.github.com/users/luisasanmartin","html_url":"https://github.com/luisasanmartin","followers_url":"https://api.github.com/users/luisasanmartin/followers","following_url":"https://api.github.com/users/luisasanmartin/following{/other_user}","gists_url":"https://api.github.com/users/luisasanmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/luisasanmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisasanmartin/subscriptions","organizations_url":"https://api.github.com/users/luisasanmartin/orgs","repos_url":"https://api.github.com/users/luisasanmartin/repos","events_url":"https://api.github.com/users/luisasanmartin/events{/privacy}","received_events_url":"https://api.github.com/users/luisasanmartin/received_events","type":"User","site_admin":false},"body":"Can we move this into showErrorDialog? Also please guard the dismiss call by checking if spinningIconDialog is null. We're having an issue with null pointers in other places in the app and will be implementing this check throughout.","created_at":"2018-06-18T12:44:01Z","updated_at":"2018-06-18T12:44:01Z","html_url":"https://github.com/uwblueprint/foe-android/pull/31#discussion_r196062684","pull_request_url":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uwblueprint/foe-android/pulls/comments/196062684"},"html":{"href":"https://github.com/uwblueprint/foe-android/pull/31#discussion_r196062684"},"pull_request":{"href":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31","id":193836934,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzODM2OTM0","html_url":"https://github.com/uwblueprint/foe-android/pull/31","diff_url":"https://github.com/uwblueprint/foe-android/pull/31.diff","patch_url":"https://github.com/uwblueprint/foe-android/pull/31.patch","issue_url":"https://api.github.com/repos/uwblueprint/foe-android/issues/31","number":31,"state":"open","locked":false,"title":"Email password login","user":{"login":"Steven-Jia","id":7576513,"node_id":"MDQ6VXNlcjc1NzY1MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/7576513?v=4","gravatar_id":"","url":"https://api.github.com/users/Steven-Jia","html_url":"https://github.com/Steven-Jia","followers_url":"https://api.github.com/users/Steven-Jia/followers","following_url":"https://api.github.com/users/Steven-Jia/following{/other_user}","gists_url":"https://api.github.com/users/Steven-Jia/gists{/gist_id}","starred_url":"https://api.github.com/users/Steven-Jia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Steven-Jia/subscriptions","organizations_url":"https://api.github.com/users/Steven-Jia/orgs","repos_url":"https://api.github.com/users/Steven-Jia/repos","events_url":"https://api.github.com/users/Steven-Jia/events{/privacy}","received_events_url":"https://api.github.com/users/Steven-Jia/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-10T17:24:14Z","updated_at":"2018-06-18T12:44:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba7558cca5b008f38bb5248477400744ac364da4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31/commits","review_comments_url":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31/comments","review_comment_url":"https://api.github.com/repos/uwblueprint/foe-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uwblueprint/foe-android/issues/31/comments","statuses_url":"https://api.github.com/repos/uwblueprint/foe-android/statuses/b979704ed3500de582fd9fc1aca2ce2a9ac7ad16","head":{"label":"uwblueprint:EmailPasswordLogin","ref":"EmailPasswordLogin","sha":"b979704ed3500de582fd9fc1aca2ce2a9ac7ad16","user":{"login":"uwblueprint","id":22460895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDYwODk1","avatar_url":"https://avatars1.githubusercontent.com/u/22460895?v=4","gravatar_id":"","url":"https://api.github.com/users/uwblueprint","html_url":"https://github.com/uwblueprint","followers_url":"https://api.github.com/users/uwblueprint/followers","following_url":"https://api.github.com/users/uwblueprint/following{/other_user}","gists_url":"https://api.github.com/users/uwblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/uwblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwblueprint/subscriptions","organizations_url":"https://api.github.com/users/uwblueprint/orgs","repos_url":"https://api.github.com/users/uwblueprint/repos","events_url":"https://api.github.com/users/uwblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/uwblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":92100310,"node_id":"MDEwOlJlcG9zaXRvcnk5MjEwMDMxMA==","name":"foe-android","full_name":"uwblueprint/foe-android","owner":{"login":"uwblueprint","id":22460895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDYwODk1","avatar_url":"https://avatars1.githubusercontent.com/u/22460895?v=4","gravatar_id":"","url":"https://api.github.com/users/uwblueprint","html_url":"https://github.com/uwblueprint","followers_url":"https://api.github.com/users/uwblueprint/followers","following_url":"https://api.github.com/users/uwblueprint/following{/other_user}","gists_url":"https://api.github.com/users/uwblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/uwblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwblueprint/subscriptions","organizations_url":"https://api.github.com/users/uwblueprint/orgs","repos_url":"https://api.github.com/users/uwblueprint/repos","events_url":"https://api.github.com/users/uwblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/uwblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwblueprint/foe-android","description":"The Android client for the FOE bee app","fork":false,"url":"https://api.github.com/repos/uwblueprint/foe-android","forks_url":"https://api.github.com/repos/uwblueprint/foe-android/forks","keys_url":"https://api.github.com/repos/uwblueprint/foe-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwblueprint/foe-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwblueprint/foe-android/teams","hooks_url":"https://api.github.com/repos/uwblueprint/foe-android/hooks","issue_events_url":"https://api.github.com/repos/uwblueprint/foe-android/issues/events{/number}","events_url":"https://api.github.com/repos/uwblueprint/foe-android/events","assignees_url":"https://api.github.com/repos/uwblueprint/foe-android/assignees{/user}","branches_url":"https://api.github.com/repos/uwblueprint/foe-android/branches{/branch}","tags_url":"https://api.github.com/repos/uwblueprint/foe-android/tags","blobs_url":"https://api.github.com/repos/uwblueprint/foe-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwblueprint/foe-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwblueprint/foe-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwblueprint/foe-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwblueprint/foe-android/statuses/{sha}","languages_url":"https://api.github.com/repos/uwblueprint/foe-android/languages","stargazers_url":"https://api.github.com/repos/uwblueprint/foe-android/stargazers","contributors_url":"https://api.github.com/repos/uwblueprint/foe-android/contributors","subscribers_url":"https://api.github.com/repos/uwblueprint/foe-android/subscribers","subscription_url":"https://api.github.com/repos/uwblueprint/foe-android/subscription","commits_url":"https://api.github.com/repos/uwblueprint/foe-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwblueprint/foe-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwblueprint/foe-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwblueprint/foe-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwblueprint/foe-android/contents/{+path}","compare_url":"https://api.github.com/repos/uwblueprint/foe-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwblueprint/foe-android/merges","archive_url":"https://api.github.com/repos/uwblueprint/foe-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwblueprint/foe-android/downloads","issues_url":"https://api.github.com/repos/uwblueprint/foe-android/issues{/number}","pulls_url":"https://api.github.com/repos/uwblueprint/foe-android/pulls{/number}","milestones_url":"https://api.github.com/repos/uwblueprint/foe-android/milestones{/number}","notifications_url":"https://api.github.com/repos/uwblueprint/foe-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwblueprint/foe-android/labels{/name}","releases_url":"https://api.github.com/repos/uwblueprint/foe-android/releases{/id}","deployments_url":"https://api.github.com/repos/uwblueprint/foe-android/deployments","created_at":"2017-05-22T21:18:27Z","updated_at":"2018-04-05T17:13:27Z","pushed_at":"2018-06-16T23:33:52Z","git_url":"git://github.com/uwblueprint/foe-android.git","ssh_url":"git@github.com:uwblueprint/foe-android.git","clone_url":"https://github.com/uwblueprint/foe-android.git","svn_url":"https://github.com/uwblueprint/foe-android","homepage":null,"size":3464,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"base":{"label":"uwblueprint:dev","ref":"dev","sha":"b6f5e41fe34a5e8d7952a620aa613c4f57f7a096","user":{"login":"uwblueprint","id":22460895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDYwODk1","avatar_url":"https://avatars1.githubusercontent.com/u/22460895?v=4","gravatar_id":"","url":"https://api.github.com/users/uwblueprint","html_url":"https://github.com/uwblueprint","followers_url":"https://api.github.com/users/uwblueprint/followers","following_url":"https://api.github.com/users/uwblueprint/following{/other_user}","gists_url":"https://api.github.com/users/uwblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/uwblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwblueprint/subscriptions","organizations_url":"https://api.github.com/users/uwblueprint/orgs","repos_url":"https://api.github.com/users/uwblueprint/repos","events_url":"https://api.github.com/users/uwblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/uwblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":92100310,"node_id":"MDEwOlJlcG9zaXRvcnk5MjEwMDMxMA==","name":"foe-android","full_name":"uwblueprint/foe-android","owner":{"login":"uwblueprint","id":22460895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDYwODk1","avatar_url":"https://avatars1.githubusercontent.com/u/22460895?v=4","gravatar_id":"","url":"https://api.github.com/users/uwblueprint","html_url":"https://github.com/uwblueprint","followers_url":"https://api.github.com/users/uwblueprint/followers","following_url":"https://api.github.com/users/uwblueprint/following{/other_user}","gists_url":"https://api.github.com/users/uwblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/uwblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwblueprint/subscriptions","organizations_url":"https://api.github.com/users/uwblueprint/orgs","repos_url":"https://api.github.com/users/uwblueprint/repos","events_url":"https://api.github.com/users/uwblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/uwblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwblueprint/foe-android","description":"The Android client for the FOE bee app","fork":false,"url":"https://api.github.com/repos/uwblueprint/foe-android","forks_url":"https://api.github.com/repos/uwblueprint/foe-android/forks","keys_url":"https://api.github.com/repos/uwblueprint/foe-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwblueprint/foe-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwblueprint/foe-android/teams","hooks_url":"https://api.github.com/repos/uwblueprint/foe-android/hooks","issue_events_url":"https://api.github.com/repos/uwblueprint/foe-android/issues/events{/number}","events_url":"https://api.github.com/repos/uwblueprint/foe-android/events","assignees_url":"https://api.github.com/repos/uwblueprint/foe-android/assignees{/user}","branches_url":"https://api.github.com/repos/uwblueprint/foe-android/branches{/branch}","tags_url":"https://api.github.com/repos/uwblueprint/foe-android/tags","blobs_url":"https://api.github.com/repos/uwblueprint/foe-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwblueprint/foe-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwblueprint/foe-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwblueprint/foe-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwblueprint/foe-android/statuses/{sha}","languages_url":"https://api.github.com/repos/uwblueprint/foe-android/languages","stargazers_url":"https://api.github.com/repos/uwblueprint/foe-android/stargazers","contributors_url":"https://api.github.com/repos/uwblueprint/foe-android/contributors","subscribers_url":"https://api.github.com/repos/uwblueprint/foe-android/subscribers","subscription_url":"https://api.github.com/repos/uwblueprint/foe-android/subscription","commits_url":"https://api.github.com/repos/uwblueprint/foe-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwblueprint/foe-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwblueprint/foe-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwblueprint/foe-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwblueprint/foe-android/contents/{+path}","compare_url":"https://api.github.com/repos/uwblueprint/foe-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwblueprint/foe-android/merges","archive_url":"https://api.github.com/repos/uwblueprint/foe-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwblueprint/foe-android/downloads","issues_url":"https://api.github.com/repos/uwblueprint/foe-android/issues{/number}","pulls_url":"https://api.github.com/repos/uwblueprint/foe-android/pulls{/number}","milestones_url":"https://api.github.com/repos/uwblueprint/foe-android/milestones{/number}","notifications_url":"https://api.github.com/repos/uwblueprint/foe-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwblueprint/foe-android/labels{/name}","releases_url":"https://api.github.com/repos/uwblueprint/foe-android/releases{/id}","deployments_url":"https://api.github.com/repos/uwblueprint/foe-android/deployments","created_at":"2017-05-22T21:18:27Z","updated_at":"2018-04-05T17:13:27Z","pushed_at":"2018-06-16T23:33:52Z","git_url":"git://github.com/uwblueprint/foe-android.git","ssh_url":"git@github.com:uwblueprint/foe-android.git","clone_url":"https://github.com/uwblueprint/foe-android.git","svn_url":"https://github.com/uwblueprint/foe-android","homepage":null,"size":3464,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31"},"html":{"href":"https://github.com/uwblueprint/foe-android/pull/31"},"issue":{"href":"https://api.github.com/repos/uwblueprint/foe-android/issues/31"},"comments":{"href":"https://api.github.com/repos/uwblueprint/foe-android/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/uwblueprint/foe-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uwblueprint/foe-android/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/uwblueprint/foe-android/statuses/b979704ed3500de582fd9fc1aca2ce2a9ac7ad16"}},"author_association":"NONE"}}
{"actor":{"display_login":"luisasanmartin"}}