{"action":"created","comment":{"url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/comments/242435385","pull_request_review_id":185940625,"id":242435385,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjQzNTM4NQ==","diff_hunk":"@@ -1,13 +1,104 @@\n package com.example.kienphung.lesson6;\n \n-import android.support.v7.app.AppCompatActivity;\n+import android.Manifest;\n+import android.content.ContentResolver;\n+import android.content.pm.PackageManager;\n+import android.database.Cursor;\n+import android.net.Uri;\n+import android.os.Build;\n import android.os.Bundle;\n+import android.provider.ContactsContract;\n+import android.support.annotation.NonNull;\n+import android.support.v4.content.ContextCompat;\n+import android.support.v7.app.AppCompatActivity;\n+import android.support.v7.widget.RecyclerView;\n+\n+import java.util.ArrayList;\n \n public class MainActivity extends AppCompatActivity {\n \n+    public static final Uri CONTENT_URI = ContactsContract.Contacts.CONTENT_URI;\n+    public static final String WHERE = \" = ? \";\n+    private static final int REQUEST_PERMISSION = 1;\n+    private ContentResolver mContentResolver;\n+    private ArrayList<ItemContact> mContacts;\n+    private ContactAdapter mContactAdapter;\n+\n     @Override\n     protected void onCreate(Bundle savedInstanceState) {\n         super.onCreate(savedInstanceState);\n         setContentView(R.layout.activity_main);\n+        mContacts = new ArrayList<>();\n+        checkPermission();\n+    }\n+\n+    public void initView() {\n+        RecyclerView recyclerView = findViewById(R.id.recycler_view);\n+        recyclerView.setHasFixedSize(true);\n+        mContactAdapter = new ContactAdapter(this, mContacts);\n+        recyclerView.setAdapter(mContactAdapter);\n+        loadContacts();\n+    }\n+\n+    public ArrayList<ItemContact> loadContacts() {","path":"app/src/main/java/com/example/kienphung/lesson6/MainActivity.java","position":44,"original_position":44,"commit_id":"b97398186dc394c7313db76a3e622da93aa69a04","original_commit_id":"b97398186dc394c7313db76a3e622da93aa69a04","user":{"login":"NguyenMinhTuanB","id":36411574,"node_id":"MDQ6VXNlcjM2NDExNTc0","avatar_url":"https://avatars3.githubusercontent.com/u/36411574?v=4","gravatar_id":"","url":"https://api.github.com/users/NguyenMinhTuanB","html_url":"https://github.com/NguyenMinhTuanB","followers_url":"https://api.github.com/users/NguyenMinhTuanB/followers","following_url":"https://api.github.com/users/NguyenMinhTuanB/following{/other_user}","gists_url":"https://api.github.com/users/NguyenMinhTuanB/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenMinhTuanB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenMinhTuanB/subscriptions","organizations_url":"https://api.github.com/users/NguyenMinhTuanB/orgs","repos_url":"https://api.github.com/users/NguyenMinhTuanB/repos","events_url":"https://api.github.com/users/NguyenMinhTuanB/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenMinhTuanB/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n    public List<Contact> loadContacts() {\r\n```","created_at":"2018-12-18T07:58:09Z","updated_at":"2018-12-18T07:59:28Z","html_url":"https://github.com/phungvankien1997/Lesson6/pull/2#discussion_r242435385","pull_request_url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/comments/242435385"},"html":{"href":"https://github.com/phungvankien1997/Lesson6/pull/2#discussion_r242435385"},"pull_request":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2","id":239391247,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MzkxMjQ3","html_url":"https://github.com/phungvankien1997/Lesson6/pull/2","diff_url":"https://github.com/phungvankien1997/Lesson6/pull/2.diff","patch_url":"https://github.com/phungvankien1997/Lesson6/pull/2.patch","issue_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/2","number":2,"state":"open","locked":false,"title":" finish homework","user":{"login":"phungvankien1997","id":45552038,"node_id":"MDQ6VXNlcjQ1NTUyMDM4","avatar_url":"https://avatars0.githubusercontent.com/u/45552038?v=4","gravatar_id":"","url":"https://api.github.com/users/phungvankien1997","html_url":"https://github.com/phungvankien1997","followers_url":"https://api.github.com/users/phungvankien1997/followers","following_url":"https://api.github.com/users/phungvankien1997/following{/other_user}","gists_url":"https://api.github.com/users/phungvankien1997/gists{/gist_id}","starred_url":"https://api.github.com/users/phungvankien1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phungvankien1997/subscriptions","organizations_url":"https://api.github.com/users/phungvankien1997/orgs","repos_url":"https://api.github.com/users/phungvankien1997/repos","events_url":"https://api.github.com/users/phungvankien1997/events{/privacy}","received_events_url":"https://api.github.com/users/phungvankien1997/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-18T07:40:37Z","updated_at":"2018-12-18T07:59:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69f4d4b5444f7e69241b7b958ad4d58d3fe1e4dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2/commits","review_comments_url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2/comments","review_comment_url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/2/comments","statuses_url":"https://api.github.com/repos/phungvankien1997/Lesson6/statuses/b97398186dc394c7313db76a3e622da93aa69a04","head":{"label":"phungvankien1997:main_funtion","ref":"main_funtion","sha":"b97398186dc394c7313db76a3e622da93aa69a04","user":{"login":"phungvankien1997","id":45552038,"node_id":"MDQ6VXNlcjQ1NTUyMDM4","avatar_url":"https://avatars0.githubusercontent.com/u/45552038?v=4","gravatar_id":"","url":"https://api.github.com/users/phungvankien1997","html_url":"https://github.com/phungvankien1997","followers_url":"https://api.github.com/users/phungvankien1997/followers","following_url":"https://api.github.com/users/phungvankien1997/following{/other_user}","gists_url":"https://api.github.com/users/phungvankien1997/gists{/gist_id}","starred_url":"https://api.github.com/users/phungvankien1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phungvankien1997/subscriptions","organizations_url":"https://api.github.com/users/phungvankien1997/orgs","repos_url":"https://api.github.com/users/phungvankien1997/repos","events_url":"https://api.github.com/users/phungvankien1997/events{/privacy}","received_events_url":"https://api.github.com/users/phungvankien1997/received_events","type":"User","site_admin":false},"repo":{"id":162241744,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIyNDE3NDQ=","name":"Lesson6","full_name":"phungvankien1997/Lesson6","private":false,"owner":{"login":"phungvankien1997","id":45552038,"node_id":"MDQ6VXNlcjQ1NTUyMDM4","avatar_url":"https://avatars0.githubusercontent.com/u/45552038?v=4","gravatar_id":"","url":"https://api.github.com/users/phungvankien1997","html_url":"https://github.com/phungvankien1997","followers_url":"https://api.github.com/users/phungvankien1997/followers","following_url":"https://api.github.com/users/phungvankien1997/following{/other_user}","gists_url":"https://api.github.com/users/phungvankien1997/gists{/gist_id}","starred_url":"https://api.github.com/users/phungvankien1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phungvankien1997/subscriptions","organizations_url":"https://api.github.com/users/phungvankien1997/orgs","repos_url":"https://api.github.com/users/phungvankien1997/repos","events_url":"https://api.github.com/users/phungvankien1997/events{/privacy}","received_events_url":"https://api.github.com/users/phungvankien1997/received_events","type":"User","site_admin":false},"html_url":"https://github.com/phungvankien1997/Lesson6","description":null,"fork":false,"url":"https://api.github.com/repos/phungvankien1997/Lesson6","forks_url":"https://api.github.com/repos/phungvankien1997/Lesson6/forks","keys_url":"https://api.github.com/repos/phungvankien1997/Lesson6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phungvankien1997/Lesson6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phungvankien1997/Lesson6/teams","hooks_url":"https://api.github.com/repos/phungvankien1997/Lesson6/hooks","issue_events_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/events{/number}","events_url":"https://api.github.com/repos/phungvankien1997/Lesson6/events","assignees_url":"https://api.github.com/repos/phungvankien1997/Lesson6/assignees{/user}","branches_url":"https://api.github.com/repos/phungvankien1997/Lesson6/branches{/branch}","tags_url":"https://api.github.com/repos/phungvankien1997/Lesson6/tags","blobs_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/refs{/sha}","trees_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phungvankien1997/Lesson6/statuses/{sha}","languages_url":"https://api.github.com/repos/phungvankien1997/Lesson6/languages","stargazers_url":"https://api.github.com/repos/phungvankien1997/Lesson6/stargazers","contributors_url":"https://api.github.com/repos/phungvankien1997/Lesson6/contributors","subscribers_url":"https://api.github.com/repos/phungvankien1997/Lesson6/subscribers","subscription_url":"https://api.github.com/repos/phungvankien1997/Lesson6/subscription","commits_url":"https://api.github.com/repos/phungvankien1997/Lesson6/commits{/sha}","git_commits_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/commits{/sha}","comments_url":"https://api.github.com/repos/phungvankien1997/Lesson6/comments{/number}","issue_comment_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/comments{/number}","contents_url":"https://api.github.com/repos/phungvankien1997/Lesson6/contents/{+path}","compare_url":"https://api.github.com/repos/phungvankien1997/Lesson6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phungvankien1997/Lesson6/merges","archive_url":"https://api.github.com/repos/phungvankien1997/Lesson6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phungvankien1997/Lesson6/downloads","issues_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues{/number}","pulls_url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls{/number}","milestones_url":"https://api.github.com/repos/phungvankien1997/Lesson6/milestones{/number}","notifications_url":"https://api.github.com/repos/phungvankien1997/Lesson6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phungvankien1997/Lesson6/labels{/name}","releases_url":"https://api.github.com/repos/phungvankien1997/Lesson6/releases{/id}","deployments_url":"https://api.github.com/repos/phungvankien1997/Lesson6/deployments","created_at":"2018-12-18T06:33:40Z","updated_at":"2018-12-18T06:49:15Z","pushed_at":"2018-12-18T07:42:12Z","git_url":"git://github.com/phungvankien1997/Lesson6.git","ssh_url":"git@github.com:phungvankien1997/Lesson6.git","clone_url":"https://github.com/phungvankien1997/Lesson6.git","svn_url":"https://github.com/phungvankien1997/Lesson6","homepage":null,"size":123,"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":"develop"}},"base":{"label":"phungvankien1997:develop","ref":"develop","sha":"c96b2955e61fe00e4ef296b87f304883ab701bb1","user":{"login":"phungvankien1997","id":45552038,"node_id":"MDQ6VXNlcjQ1NTUyMDM4","avatar_url":"https://avatars0.githubusercontent.com/u/45552038?v=4","gravatar_id":"","url":"https://api.github.com/users/phungvankien1997","html_url":"https://github.com/phungvankien1997","followers_url":"https://api.github.com/users/phungvankien1997/followers","following_url":"https://api.github.com/users/phungvankien1997/following{/other_user}","gists_url":"https://api.github.com/users/phungvankien1997/gists{/gist_id}","starred_url":"https://api.github.com/users/phungvankien1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phungvankien1997/subscriptions","organizations_url":"https://api.github.com/users/phungvankien1997/orgs","repos_url":"https://api.github.com/users/phungvankien1997/repos","events_url":"https://api.github.com/users/phungvankien1997/events{/privacy}","received_events_url":"https://api.github.com/users/phungvankien1997/received_events","type":"User","site_admin":false},"repo":{"id":162241744,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIyNDE3NDQ=","name":"Lesson6","full_name":"phungvankien1997/Lesson6","private":false,"owner":{"login":"phungvankien1997","id":45552038,"node_id":"MDQ6VXNlcjQ1NTUyMDM4","avatar_url":"https://avatars0.githubusercontent.com/u/45552038?v=4","gravatar_id":"","url":"https://api.github.com/users/phungvankien1997","html_url":"https://github.com/phungvankien1997","followers_url":"https://api.github.com/users/phungvankien1997/followers","following_url":"https://api.github.com/users/phungvankien1997/following{/other_user}","gists_url":"https://api.github.com/users/phungvankien1997/gists{/gist_id}","starred_url":"https://api.github.com/users/phungvankien1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phungvankien1997/subscriptions","organizations_url":"https://api.github.com/users/phungvankien1997/orgs","repos_url":"https://api.github.com/users/phungvankien1997/repos","events_url":"https://api.github.com/users/phungvankien1997/events{/privacy}","received_events_url":"https://api.github.com/users/phungvankien1997/received_events","type":"User","site_admin":false},"html_url":"https://github.com/phungvankien1997/Lesson6","description":null,"fork":false,"url":"https://api.github.com/repos/phungvankien1997/Lesson6","forks_url":"https://api.github.com/repos/phungvankien1997/Lesson6/forks","keys_url":"https://api.github.com/repos/phungvankien1997/Lesson6/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phungvankien1997/Lesson6/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phungvankien1997/Lesson6/teams","hooks_url":"https://api.github.com/repos/phungvankien1997/Lesson6/hooks","issue_events_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/events{/number}","events_url":"https://api.github.com/repos/phungvankien1997/Lesson6/events","assignees_url":"https://api.github.com/repos/phungvankien1997/Lesson6/assignees{/user}","branches_url":"https://api.github.com/repos/phungvankien1997/Lesson6/branches{/branch}","tags_url":"https://api.github.com/repos/phungvankien1997/Lesson6/tags","blobs_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/refs{/sha}","trees_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phungvankien1997/Lesson6/statuses/{sha}","languages_url":"https://api.github.com/repos/phungvankien1997/Lesson6/languages","stargazers_url":"https://api.github.com/repos/phungvankien1997/Lesson6/stargazers","contributors_url":"https://api.github.com/repos/phungvankien1997/Lesson6/contributors","subscribers_url":"https://api.github.com/repos/phungvankien1997/Lesson6/subscribers","subscription_url":"https://api.github.com/repos/phungvankien1997/Lesson6/subscription","commits_url":"https://api.github.com/repos/phungvankien1997/Lesson6/commits{/sha}","git_commits_url":"https://api.github.com/repos/phungvankien1997/Lesson6/git/commits{/sha}","comments_url":"https://api.github.com/repos/phungvankien1997/Lesson6/comments{/number}","issue_comment_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/comments{/number}","contents_url":"https://api.github.com/repos/phungvankien1997/Lesson6/contents/{+path}","compare_url":"https://api.github.com/repos/phungvankien1997/Lesson6/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phungvankien1997/Lesson6/merges","archive_url":"https://api.github.com/repos/phungvankien1997/Lesson6/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phungvankien1997/Lesson6/downloads","issues_url":"https://api.github.com/repos/phungvankien1997/Lesson6/issues{/number}","pulls_url":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls{/number}","milestones_url":"https://api.github.com/repos/phungvankien1997/Lesson6/milestones{/number}","notifications_url":"https://api.github.com/repos/phungvankien1997/Lesson6/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phungvankien1997/Lesson6/labels{/name}","releases_url":"https://api.github.com/repos/phungvankien1997/Lesson6/releases{/id}","deployments_url":"https://api.github.com/repos/phungvankien1997/Lesson6/deployments","created_at":"2018-12-18T06:33:40Z","updated_at":"2018-12-18T06:49:15Z","pushed_at":"2018-12-18T07:42:12Z","git_url":"git://github.com/phungvankien1997/Lesson6.git","ssh_url":"git@github.com:phungvankien1997/Lesson6.git","clone_url":"https://github.com/phungvankien1997/Lesson6.git","svn_url":"https://github.com/phungvankien1997/Lesson6","homepage":null,"size":123,"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":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2"},"html":{"href":"https://github.com/phungvankien1997/Lesson6/pull/2"},"issue":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/2"},"comments":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/phungvankien1997/Lesson6/statuses/b97398186dc394c7313db76a3e622da93aa69a04"}},"author_association":"OWNER"}}
{"actor":{"display_login":"NguyenMinhTuanB"}}