{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fel_2/pulls/comments/60556600","id":60556600,"diff_hunk":"@@ -0,0 +1,73 @@\n+package com.framgia.e_learningsimple.util;\n+\n+import android.content.Context;\n+import android.content.Intent;\n+import android.content.SharedPreferences;\n+import android.widget.Toast;\n+\n+import com.framgia.e_learningsimple.R;\n+import com.framgia.e_learningsimple.constant.JsonKeyConstant;\n+import com.framgia.e_learningsimple.model.RequestHelper;\n+import com.framgia.e_learningsimple.model.ResponseHelper;\n+import com.framgia.e_learningsimple.network.ErrorNetwork;\n+import com.framgia.e_learningsimple.sharepreference.SharePreferences;\n+import com.framgia.e_learningsimple.url.UrlJson;\n+\n+import org.json.JSONException;\n+import org.json.JSONObject;\n+\n+import java.io.IOException;\n+import java.io.UnsupportedEncodingException;\n+import java.net.MalformedURLException;\n+\n+/**\n+ * Created by ThuyIT on 21/04/2016.\n+ */\n+public class RegisterAsynctask extends MyAsynctask<String, Void, String> {\n+    String mUserName, mUserEmail, mUserPassword, mUserRePassword;\n+    public static final String NAME_PARAMNAME = \"user[name]\";\n+    public static final String EMAIL_PARAMNAME = \"user[email]\";\n+    public static final String PASSWORD_PARAMNAME = \"user[password]\";\n+    public static final String REPASSWORD_PARAMNAME = \"user[password_confirmation]\";\n+    private int mStatusCode;\n+    private String mResponseBody;\n+    private SharedPreferences mSharedPreferences;\n+\n+    public RegisterAsynctask(Context mContext, SharedPreferences sharedPreferences){\n+        super(mContext);\n+    }\n+\n+    @Override\n+    protected String doInBackground(String... args) {\n+        mUserName = args[0];\n+        mUserEmail = args[1];\n+        mUserPassword = args[2];\n+        mUserRePassword = args[3];\n+\n+        ValueName valueName1 = new ValueName(NAME_PARAMNAME, mUserName);\n+        ValueName valueName2 = new ValueName(EMAIL_PARAMNAME, mUserEmail);\n+        ValueName valueName3 = new ValueName(PASSWORD_PARAMNAME, mUserPassword);\n+        ValueName valueName4 = new ValueName(REPASSWORD_PARAMNAME, mUserRePassword);\n+        ResponseHelper responseHelper = null;\n+        try{\n+            responseHelper = RequestHelper.executeRequest(UrlJson.REGISTER_URL,\n+                    RequestHelper.Method.POST, valueName1, valueName2, valueName3, valueName4);\n+            mStatusCode = responseHelper.getResponeCode();\n+            mResponseBody = responseHelper.getResponeBody();\n+        } catch (MalformedURLException e) {\n+            e.printStackTrace();\n+        } catch (UnsupportedEncodingException e){\n+            e.printStackTrace();\n+        } catch (IOException e){\n+            e.printStackTrace();\n+        }\n+        return null;\n+    }\n+\n+    @Override\n+    protected void onPostExecute(String result) {\n+        super.onPostExecute(result);\n+        Toast.makeText(mContext, mContext.getString(R.string.dialog_register_fail), Toast.LENGTH_SHORT).show();","path":"app/src/main/java/com/framgia/e_learningsimple/util/RegisterAsynctask.java","position":70,"original_position":70,"commit_id":"ff3559bb09d416c116a67b8b3740a09a24a6f9b6","original_commit_id":"ff3559bb09d416c116a67b8b3740a09a24a6f9b6","user":{"login":"nhs3108","id":10093701,"avatar_url":"https://avatars.githubusercontent.com/u/10093701?v=3","gravatar_id":"","url":"https://api.github.com/users/nhs3108","html_url":"https://github.com/nhs3108","followers_url":"https://api.github.com/users/nhs3108/followers","following_url":"https://api.github.com/users/nhs3108/following{/other_user}","gists_url":"https://api.github.com/users/nhs3108/gists{/gist_id}","starred_url":"https://api.github.com/users/nhs3108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhs3108/subscriptions","organizations_url":"https://api.github.com/users/nhs3108/orgs","repos_url":"https://api.github.com/users/nhs3108/repos","events_url":"https://api.github.com/users/nhs3108/events{/privacy}","received_events_url":"https://api.github.com/users/nhs3108/received_events","type":"User","site_admin":false},"body":"Luôn báo failed à?","created_at":"2016-04-21T10:09:56Z","updated_at":"2016-04-21T10:09:56Z","html_url":"https://github.com/framgia/fel_2/pull/8#discussion_r60556600","pull_request_url":"https://api.github.com/repos/framgia/fel_2/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/framgia/fel_2/pulls/comments/60556600"},"html":{"href":"https://github.com/framgia/fel_2/pull/8#discussion_r60556600"},"pull_request":{"href":"https://api.github.com/repos/framgia/fel_2/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fel_2/pulls/8","id":67300325,"html_url":"https://github.com/framgia/fel_2/pull/8","diff_url":"https://github.com/framgia/fel_2/pull/8.diff","patch_url":"https://github.com/framgia/fel_2/pull/8.patch","issue_url":"https://api.github.com/repos/framgia/fel_2/issues/8","number":8,"state":"open","locked":false,"title":"[Task-60464] Register_Activity","user":{"login":"ThuyLT","id":18107049,"avatar_url":"https://avatars.githubusercontent.com/u/18107049?v=3","gravatar_id":"","url":"https://api.github.com/users/ThuyLT","html_url":"https://github.com/ThuyLT","followers_url":"https://api.github.com/users/ThuyLT/followers","following_url":"https://api.github.com/users/ThuyLT/following{/other_user}","gists_url":"https://api.github.com/users/ThuyLT/gists{/gist_id}","starred_url":"https://api.github.com/users/ThuyLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThuyLT/subscriptions","organizations_url":"https://api.github.com/users/ThuyLT/orgs","repos_url":"https://api.github.com/users/ThuyLT/repos","events_url":"https://api.github.com/users/ThuyLT/events{/privacy}","received_events_url":"https://api.github.com/users/ThuyLT/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-21T05:51:10Z","updated_at":"2016-04-21T10:09:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac8608fdf4f1ca6c260f0943bbbc6b6fdc4cbfc2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fel_2/pulls/8/commits","review_comments_url":"https://api.github.com/repos/framgia/fel_2/pulls/8/comments","review_comment_url":"https://api.github.com/repos/framgia/fel_2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fel_2/issues/8/comments","statuses_url":"https://api.github.com/repos/framgia/fel_2/statuses/ff3559bb09d416c116a67b8b3740a09a24a6f9b6","head":{"label":"ThuyLT:RegisterActivity","ref":"RegisterActivity","sha":"ff3559bb09d416c116a67b8b3740a09a24a6f9b6","user":{"login":"ThuyLT","id":18107049,"avatar_url":"https://avatars.githubusercontent.com/u/18107049?v=3","gravatar_id":"","url":"https://api.github.com/users/ThuyLT","html_url":"https://github.com/ThuyLT","followers_url":"https://api.github.com/users/ThuyLT/followers","following_url":"https://api.github.com/users/ThuyLT/following{/other_user}","gists_url":"https://api.github.com/users/ThuyLT/gists{/gist_id}","starred_url":"https://api.github.com/users/ThuyLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThuyLT/subscriptions","organizations_url":"https://api.github.com/users/ThuyLT/orgs","repos_url":"https://api.github.com/users/ThuyLT/repos","events_url":"https://api.github.com/users/ThuyLT/events{/privacy}","received_events_url":"https://api.github.com/users/ThuyLT/received_events","type":"User","site_admin":false},"repo":{"id":56487796,"name":"fel_2","full_name":"ThuyLT/fel_2","owner":{"login":"ThuyLT","id":18107049,"avatar_url":"https://avatars.githubusercontent.com/u/18107049?v=3","gravatar_id":"","url":"https://api.github.com/users/ThuyLT","html_url":"https://github.com/ThuyLT","followers_url":"https://api.github.com/users/ThuyLT/followers","following_url":"https://api.github.com/users/ThuyLT/following{/other_user}","gists_url":"https://api.github.com/users/ThuyLT/gists{/gist_id}","starred_url":"https://api.github.com/users/ThuyLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThuyLT/subscriptions","organizations_url":"https://api.github.com/users/ThuyLT/orgs","repos_url":"https://api.github.com/users/ThuyLT/repos","events_url":"https://api.github.com/users/ThuyLT/events{/privacy}","received_events_url":"https://api.github.com/users/ThuyLT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThuyLT/fel_2","description":"english learning","fork":true,"url":"https://api.github.com/repos/ThuyLT/fel_2","forks_url":"https://api.github.com/repos/ThuyLT/fel_2/forks","keys_url":"https://api.github.com/repos/ThuyLT/fel_2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThuyLT/fel_2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThuyLT/fel_2/teams","hooks_url":"https://api.github.com/repos/ThuyLT/fel_2/hooks","issue_events_url":"https://api.github.com/repos/ThuyLT/fel_2/issues/events{/number}","events_url":"https://api.github.com/repos/ThuyLT/fel_2/events","assignees_url":"https://api.github.com/repos/ThuyLT/fel_2/assignees{/user}","branches_url":"https://api.github.com/repos/ThuyLT/fel_2/branches{/branch}","tags_url":"https://api.github.com/repos/ThuyLT/fel_2/tags","blobs_url":"https://api.github.com/repos/ThuyLT/fel_2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThuyLT/fel_2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThuyLT/fel_2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThuyLT/fel_2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThuyLT/fel_2/statuses/{sha}","languages_url":"https://api.github.com/repos/ThuyLT/fel_2/languages","stargazers_url":"https://api.github.com/repos/ThuyLT/fel_2/stargazers","contributors_url":"https://api.github.com/repos/ThuyLT/fel_2/contributors","subscribers_url":"https://api.github.com/repos/ThuyLT/fel_2/subscribers","subscription_url":"https://api.github.com/repos/ThuyLT/fel_2/subscription","commits_url":"https://api.github.com/repos/ThuyLT/fel_2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThuyLT/fel_2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThuyLT/fel_2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThuyLT/fel_2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThuyLT/fel_2/contents/{+path}","compare_url":"https://api.github.com/repos/ThuyLT/fel_2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThuyLT/fel_2/merges","archive_url":"https://api.github.com/repos/ThuyLT/fel_2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThuyLT/fel_2/downloads","issues_url":"https://api.github.com/repos/ThuyLT/fel_2/issues{/number}","pulls_url":"https://api.github.com/repos/ThuyLT/fel_2/pulls{/number}","milestones_url":"https://api.github.com/repos/ThuyLT/fel_2/milestones{/number}","notifications_url":"https://api.github.com/repos/ThuyLT/fel_2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThuyLT/fel_2/labels{/name}","releases_url":"https://api.github.com/repos/ThuyLT/fel_2/releases{/id}","deployments_url":"https://api.github.com/repos/ThuyLT/fel_2/deployments","created_at":"2016-04-18T07:48:59Z","updated_at":"2016-04-18T07:01:14Z","pushed_at":"2016-04-21T05:50:01Z","git_url":"git://github.com/ThuyLT/fel_2.git","ssh_url":"git@github.com:ThuyLT/fel_2.git","clone_url":"https://github.com/ThuyLT/fel_2.git","svn_url":"https://github.com/ThuyLT/fel_2","homepage":null,"size":97,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"69a13faf87f1c214e5777a0803fadfa042e7d4f4","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":56484675,"name":"fel_2","full_name":"framgia/fel_2","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fel_2","description":"english learning","fork":false,"url":"https://api.github.com/repos/framgia/fel_2","forks_url":"https://api.github.com/repos/framgia/fel_2/forks","keys_url":"https://api.github.com/repos/framgia/fel_2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fel_2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fel_2/teams","hooks_url":"https://api.github.com/repos/framgia/fel_2/hooks","issue_events_url":"https://api.github.com/repos/framgia/fel_2/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fel_2/events","assignees_url":"https://api.github.com/repos/framgia/fel_2/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fel_2/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fel_2/tags","blobs_url":"https://api.github.com/repos/framgia/fel_2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fel_2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fel_2/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fel_2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fel_2/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fel_2/languages","stargazers_url":"https://api.github.com/repos/framgia/fel_2/stargazers","contributors_url":"https://api.github.com/repos/framgia/fel_2/contributors","subscribers_url":"https://api.github.com/repos/framgia/fel_2/subscribers","subscription_url":"https://api.github.com/repos/framgia/fel_2/subscription","commits_url":"https://api.github.com/repos/framgia/fel_2/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fel_2/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fel_2/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fel_2/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fel_2/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fel_2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fel_2/merges","archive_url":"https://api.github.com/repos/framgia/fel_2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fel_2/downloads","issues_url":"https://api.github.com/repos/framgia/fel_2/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fel_2/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fel_2/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fel_2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fel_2/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fel_2/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fel_2/deployments","created_at":"2016-04-18T07:01:14Z","updated_at":"2016-04-18T07:01:14Z","pushed_at":"2016-04-21T05:51:12Z","git_url":"git://github.com/framgia/fel_2.git","ssh_url":"git@github.com:framgia/fel_2.git","clone_url":"https://github.com/framgia/fel_2.git","svn_url":"https://github.com/framgia/fel_2","homepage":null,"size":95,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fel_2/pulls/8"},"html":{"href":"https://github.com/framgia/fel_2/pull/8"},"issue":{"href":"https://api.github.com/repos/framgia/fel_2/issues/8"},"comments":{"href":"https://api.github.com/repos/framgia/fel_2/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fel_2/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fel_2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fel_2/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fel_2/statuses/ff3559bb09d416c116a67b8b3740a09a24a6f9b6"}}}}