{"action":"created","comment":{"url":"https://api.github.com/repos/testpress/android/pulls/comments/36499200","id":36499200,"diff_hunk":"@@ -0,0 +1,194 @@\n+package in.testpress.testpress.authenticator;\n+\n+import android.app.Activity;\n+import android.app.AlertDialog;\n+import android.app.Dialog;\n+import android.app.ProgressDialog;;\n+import android.content.DialogInterface;\n+import android.content.Intent;\n+import android.os.Bundle;\n+import android.text.Editable;\n+import android.text.TextWatcher;\n+import android.view.Gravity;\n+import android.view.KeyEvent;\n+import android.view.View;\n+import android.widget.Button;\n+import android.widget.EditText;\n+import android.widget.TextView;\n+\n+import javax.inject.Inject;\n+\n+import butterknife.ButterKnife;\n+import butterknife.InjectView;\n+import butterknife.OnClick;\n+import in.testpress.testpress.Injector;\n+import in.testpress.testpress.R;\n+import in.testpress.testpress.core.TestpressService;\n+import in.testpress.testpress.models.RegistrationSuccessResponse;\n+import in.testpress.testpress.models.RegistrationErrorDetails;\n+import in.testpress.testpress.ui.MainActivity;\n+import in.testpress.testpress.ui.TextWatcherAdapter;\n+import in.testpress.testpress.util.SafeAsyncTask;\n+import retrofit.RetrofitError;\n+\n+import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;\n+\n+public class CodeVerificationActivity extends Activity {\n+    @Inject TestpressService testpressService;\n+    @InjectView(R.id.welcome) TextView welcomeText;\n+    @InjectView(R.id.et_username) EditText usernameText;\n+    @InjectView(R.id.et_verificationCode) EditText verificationCodeText;\n+    @InjectView(R.id.b_verify) Button verifyButton;\n+\n+    private String username;\n+    private String password;\n+    private boolean unknownUser;\n+    private RegistrationSuccessResponse codeResponse;\n+    private final TextWatcher watcher = validationTextWatcher();\n+\n+    @Override\n+    public void onCreate(Bundle bundle) {\n+        super.onCreate(bundle);\n+        Injector.inject(this);\n+        setContentView(R.layout.code_verify_activity);\n+        ButterKnife.inject(this);\n+        final Intent intent = getIntent();\n+        username=intent.getStringExtra(\"username\");\n+        password=intent.getStringExtra(\"password\");\n+        unknownUser=username==null;\n+        if(unknownUser) {\n+            usernameText.setVisibility(View.VISIBLE);\n+        }\n+        else\n+            welcomeText.setText(\"Welcome \"+username);","path":"app/src/main/java/in/testpress/testpress/authenticator/CodeVerificationActivity.java","position":63,"original_position":63,"commit_id":"2ae3c1ccc05a11177bc1de26020acd702ec04a0f","original_commit_id":"2ae3c1ccc05a11177bc1de26020acd702ec04a0f","user":{"login":"bharathwaaj","id":328112,"avatar_url":"https://avatars.githubusercontent.com/u/328112?v=3","gravatar_id":"","url":"https://api.github.com/users/bharathwaaj","html_url":"https://github.com/bharathwaaj","followers_url":"https://api.github.com/users/bharathwaaj/followers","following_url":"https://api.github.com/users/bharathwaaj/following{/other_user}","gists_url":"https://api.github.com/users/bharathwaaj/gists{/gist_id}","starred_url":"https://api.github.com/users/bharathwaaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bharathwaaj/subscriptions","organizations_url":"https://api.github.com/users/bharathwaaj/orgs","repos_url":"https://api.github.com/users/bharathwaaj/repos","events_url":"https://api.github.com/users/bharathwaaj/events{/privacy}","received_events_url":"https://api.github.com/users/bharathwaaj/received_events","type":"User","site_admin":false},"body":"Coding guidelines incorrect. else should be in same line as the previous closing bracket and should have braces even if single line code is present.\r\n\r\n    } else {\r\n      welcomeText.setText(\"Welcome \"+username);\r\n    }","created_at":"2015-08-07T08:17:50Z","updated_at":"2015-08-07T08:17:50Z","html_url":"https://github.com/testpress/android/pull/17#discussion_r36499200","pull_request_url":"https://api.github.com/repos/testpress/android/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/testpress/android/pulls/comments/36499200"},"html":{"href":"https://github.com/testpress/android/pull/17#discussion_r36499200"},"pull_request":{"href":"https://api.github.com/repos/testpress/android/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/testpress/android/pulls/17","id":41865772,"html_url":"https://github.com/testpress/android/pull/17","diff_url":"https://github.com/testpress/android/pull/17.diff","patch_url":"https://github.com/testpress/android/pull/17.patch","issue_url":"https://api.github.com/repos/testpress/android/issues/17","number":17,"state":"open","locked":false,"title":"Sign Up & Code Verification Applied","user":{"login":"vignesh-s","id":13272208,"avatar_url":"https://avatars.githubusercontent.com/u/13272208?v=3","gravatar_id":"","url":"https://api.github.com/users/vignesh-s","html_url":"https://github.com/vignesh-s","followers_url":"https://api.github.com/users/vignesh-s/followers","following_url":"https://api.github.com/users/vignesh-s/following{/other_user}","gists_url":"https://api.github.com/users/vignesh-s/gists{/gist_id}","starred_url":"https://api.github.com/users/vignesh-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vignesh-s/subscriptions","organizations_url":"https://api.github.com/users/vignesh-s/orgs","repos_url":"https://api.github.com/users/vignesh-s/repos","events_url":"https://api.github.com/users/vignesh-s/events{/privacy}","received_events_url":"https://api.github.com/users/vignesh-s/received_events","type":"User","site_admin":false},"body":"New users can register & then they have type the verification code sent via sms, then the app will automatically signIn & go to available exams page. if they stop the app before enter the code, they have to enter the username & code using verify code button and have to sign in manually ","created_at":"2015-08-07T07:21:03Z","updated_at":"2015-08-07T08:17:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef165c165b07798ff088f35641f197d7e2fa4c34","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/testpress/android/pulls/17/commits","review_comments_url":"https://api.github.com/repos/testpress/android/pulls/17/comments","review_comment_url":"https://api.github.com/repos/testpress/android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/testpress/android/issues/17/comments","statuses_url":"https://api.github.com/repos/testpress/android/statuses/2ae3c1ccc05a11177bc1de26020acd702ec04a0f","head":{"label":"testpress:NewRegistration","ref":"NewRegistration","sha":"2ae3c1ccc05a11177bc1de26020acd702ec04a0f","user":{"login":"testpress","id":7995463,"avatar_url":"https://avatars.githubusercontent.com/u/7995463?v=3","gravatar_id":"","url":"https://api.github.com/users/testpress","html_url":"https://github.com/testpress","followers_url":"https://api.github.com/users/testpress/followers","following_url":"https://api.github.com/users/testpress/following{/other_user}","gists_url":"https://api.github.com/users/testpress/gists{/gist_id}","starred_url":"https://api.github.com/users/testpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/testpress/subscriptions","organizations_url":"https://api.github.com/users/testpress/orgs","repos_url":"https://api.github.com/users/testpress/repos","events_url":"https://api.github.com/users/testpress/events{/privacy}","received_events_url":"https://api.github.com/users/testpress/received_events","type":"Organization","site_admin":false},"repo":{"id":32573386,"name":"android","full_name":"testpress/android","owner":{"login":"testpress","id":7995463,"avatar_url":"https://avatars.githubusercontent.com/u/7995463?v=3","gravatar_id":"","url":"https://api.github.com/users/testpress","html_url":"https://github.com/testpress","followers_url":"https://api.github.com/users/testpress/followers","following_url":"https://api.github.com/users/testpress/following{/other_user}","gists_url":"https://api.github.com/users/testpress/gists{/gist_id}","starred_url":"https://api.github.com/users/testpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/testpress/subscriptions","organizations_url":"https://api.github.com/users/testpress/orgs","repos_url":"https://api.github.com/users/testpress/repos","events_url":"https://api.github.com/users/testpress/events{/privacy}","received_events_url":"https://api.github.com/users/testpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/testpress/android","description":"Testpress Android App","fork":false,"url":"https://api.github.com/repos/testpress/android","forks_url":"https://api.github.com/repos/testpress/android/forks","keys_url":"https://api.github.com/repos/testpress/android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/testpress/android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/testpress/android/teams","hooks_url":"https://api.github.com/repos/testpress/android/hooks","issue_events_url":"https://api.github.com/repos/testpress/android/issues/events{/number}","events_url":"https://api.github.com/repos/testpress/android/events","assignees_url":"https://api.github.com/repos/testpress/android/assignees{/user}","branches_url":"https://api.github.com/repos/testpress/android/branches{/branch}","tags_url":"https://api.github.com/repos/testpress/android/tags","blobs_url":"https://api.github.com/repos/testpress/android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/testpress/android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/testpress/android/git/refs{/sha}","trees_url":"https://api.github.com/repos/testpress/android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/testpress/android/statuses/{sha}","languages_url":"https://api.github.com/repos/testpress/android/languages","stargazers_url":"https://api.github.com/repos/testpress/android/stargazers","contributors_url":"https://api.github.com/repos/testpress/android/contributors","subscribers_url":"https://api.github.com/repos/testpress/android/subscribers","subscription_url":"https://api.github.com/repos/testpress/android/subscription","commits_url":"https://api.github.com/repos/testpress/android/commits{/sha}","git_commits_url":"https://api.github.com/repos/testpress/android/git/commits{/sha}","comments_url":"https://api.github.com/repos/testpress/android/comments{/number}","issue_comment_url":"https://api.github.com/repos/testpress/android/issues/comments{/number}","contents_url":"https://api.github.com/repos/testpress/android/contents/{+path}","compare_url":"https://api.github.com/repos/testpress/android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/testpress/android/merges","archive_url":"https://api.github.com/repos/testpress/android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/testpress/android/downloads","issues_url":"https://api.github.com/repos/testpress/android/issues{/number}","pulls_url":"https://api.github.com/repos/testpress/android/pulls{/number}","milestones_url":"https://api.github.com/repos/testpress/android/milestones{/number}","notifications_url":"https://api.github.com/repos/testpress/android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/testpress/android/labels{/name}","releases_url":"https://api.github.com/repos/testpress/android/releases{/id}","created_at":"2015-03-20T08:56:29Z","updated_at":"2015-05-08T07:21:59Z","pushed_at":"2015-08-07T07:58:13Z","git_url":"git://github.com/testpress/android.git","ssh_url":"git@github.com:testpress/android.git","clone_url":"https://github.com/testpress/android.git","svn_url":"https://github.com/testpress/android","homepage":null,"size":1540,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"testpress:master","ref":"master","sha":"265ef6c48de039c84ccee1b3adf799b7acbee0fb","user":{"login":"testpress","id":7995463,"avatar_url":"https://avatars.githubusercontent.com/u/7995463?v=3","gravatar_id":"","url":"https://api.github.com/users/testpress","html_url":"https://github.com/testpress","followers_url":"https://api.github.com/users/testpress/followers","following_url":"https://api.github.com/users/testpress/following{/other_user}","gists_url":"https://api.github.com/users/testpress/gists{/gist_id}","starred_url":"https://api.github.com/users/testpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/testpress/subscriptions","organizations_url":"https://api.github.com/users/testpress/orgs","repos_url":"https://api.github.com/users/testpress/repos","events_url":"https://api.github.com/users/testpress/events{/privacy}","received_events_url":"https://api.github.com/users/testpress/received_events","type":"Organization","site_admin":false},"repo":{"id":32573386,"name":"android","full_name":"testpress/android","owner":{"login":"testpress","id":7995463,"avatar_url":"https://avatars.githubusercontent.com/u/7995463?v=3","gravatar_id":"","url":"https://api.github.com/users/testpress","html_url":"https://github.com/testpress","followers_url":"https://api.github.com/users/testpress/followers","following_url":"https://api.github.com/users/testpress/following{/other_user}","gists_url":"https://api.github.com/users/testpress/gists{/gist_id}","starred_url":"https://api.github.com/users/testpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/testpress/subscriptions","organizations_url":"https://api.github.com/users/testpress/orgs","repos_url":"https://api.github.com/users/testpress/repos","events_url":"https://api.github.com/users/testpress/events{/privacy}","received_events_url":"https://api.github.com/users/testpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/testpress/android","description":"Testpress Android App","fork":false,"url":"https://api.github.com/repos/testpress/android","forks_url":"https://api.github.com/repos/testpress/android/forks","keys_url":"https://api.github.com/repos/testpress/android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/testpress/android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/testpress/android/teams","hooks_url":"https://api.github.com/repos/testpress/android/hooks","issue_events_url":"https://api.github.com/repos/testpress/android/issues/events{/number}","events_url":"https://api.github.com/repos/testpress/android/events","assignees_url":"https://api.github.com/repos/testpress/android/assignees{/user}","branches_url":"https://api.github.com/repos/testpress/android/branches{/branch}","tags_url":"https://api.github.com/repos/testpress/android/tags","blobs_url":"https://api.github.com/repos/testpress/android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/testpress/android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/testpress/android/git/refs{/sha}","trees_url":"https://api.github.com/repos/testpress/android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/testpress/android/statuses/{sha}","languages_url":"https://api.github.com/repos/testpress/android/languages","stargazers_url":"https://api.github.com/repos/testpress/android/stargazers","contributors_url":"https://api.github.com/repos/testpress/android/contributors","subscribers_url":"https://api.github.com/repos/testpress/android/subscribers","subscription_url":"https://api.github.com/repos/testpress/android/subscription","commits_url":"https://api.github.com/repos/testpress/android/commits{/sha}","git_commits_url":"https://api.github.com/repos/testpress/android/git/commits{/sha}","comments_url":"https://api.github.com/repos/testpress/android/comments{/number}","issue_comment_url":"https://api.github.com/repos/testpress/android/issues/comments{/number}","contents_url":"https://api.github.com/repos/testpress/android/contents/{+path}","compare_url":"https://api.github.com/repos/testpress/android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/testpress/android/merges","archive_url":"https://api.github.com/repos/testpress/android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/testpress/android/downloads","issues_url":"https://api.github.com/repos/testpress/android/issues{/number}","pulls_url":"https://api.github.com/repos/testpress/android/pulls{/number}","milestones_url":"https://api.github.com/repos/testpress/android/milestones{/number}","notifications_url":"https://api.github.com/repos/testpress/android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/testpress/android/labels{/name}","releases_url":"https://api.github.com/repos/testpress/android/releases{/id}","created_at":"2015-03-20T08:56:29Z","updated_at":"2015-05-08T07:21:59Z","pushed_at":"2015-08-07T07:58:13Z","git_url":"git://github.com/testpress/android.git","ssh_url":"git@github.com:testpress/android.git","clone_url":"https://github.com/testpress/android.git","svn_url":"https://github.com/testpress/android","homepage":null,"size":1540,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/testpress/android/pulls/17"},"html":{"href":"https://github.com/testpress/android/pull/17"},"issue":{"href":"https://api.github.com/repos/testpress/android/issues/17"},"comments":{"href":"https://api.github.com/repos/testpress/android/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/testpress/android/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/testpress/android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/testpress/android/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/testpress/android/statuses/2ae3c1ccc05a11177bc1de26020acd702ec04a0f"}}}}