{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments/72375089","id":72375089,"diff_hunk":"@@ -0,0 +1,33 @@\n+package com.example.framgia.alarmclock.ui.alarms;\n+\n+import android.content.BroadcastReceiver;\n+import android.content.Context;\n+import android.content.Intent;\n+\n+import com.example.framgia.alarmclock.data.Constants;\n+import com.example.framgia.alarmclock.data.controller.AlarmRepository;\n+import com.example.framgia.alarmclock.data.model.Alarm;\n+import com.example.framgia.alarmclock.utility.AlarmUtils;\n+\n+import java.util.List;\n+\n+import io.realm.Realm;\n+\n+public class AlarmBootReceiver extends BroadcastReceiver {\n+    @Override\n+    public void onReceive(Context context, Intent intent) {\n+        if (intent.getAction().equals(Constants.ACTION_BOOT_COMPLETED)) {\n+            setupAlarm(context);\n+        }\n+    }\n+\n+    private void setupAlarm(Context context) {\n+        Realm realm = Realm.getDefaultInstance();\n+        AlarmRepository alarmRepository = new AlarmRepository(realm);\n+        List<Alarm> alarmList = alarmRepository.getAllAlarms();\n+        AlarmUtils alarmUtils = new AlarmUtils();","path":"app/src/main/java/com/example/framgia/alarmclock/ui/alarms/AlarmBootReceiver.java","position":28,"original_position":28,"commit_id":"d887a88ddd162660fc61dc37520e572c75b59101","original_commit_id":"d887a88ddd162660fc61dc37520e572c75b59101","user":{"login":"trungkienvu85","id":2076223,"avatar_url":"https://avatars.githubusercontent.com/u/2076223?v=3","gravatar_id":"","url":"https://api.github.com/users/trungkienvu85","html_url":"https://github.com/trungkienvu85","followers_url":"https://api.github.com/users/trungkienvu85/followers","following_url":"https://api.github.com/users/trungkienvu85/following{/other_user}","gists_url":"https://api.github.com/users/trungkienvu85/gists{/gist_id}","starred_url":"https://api.github.com/users/trungkienvu85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trungkienvu85/subscriptions","organizations_url":"https://api.github.com/users/trungkienvu85/orgs","repos_url":"https://api.github.com/users/trungkienvu85/repos","events_url":"https://api.github.com/users/trungkienvu85/events{/privacy}","received_events_url":"https://api.github.com/users/trungkienvu85/received_events","type":"User","site_admin":false},"body":"Chỗ này đã có AlarmUtils, vậy giả như cho cái hàm setupAlarm luôn vào đó liệu có hơn ko? vừa dễ tái sử dụng, lại đúng chức năng nhiệm vụ hơn!","created_at":"2016-07-27T03:17:40Z","updated_at":"2016-07-27T03:17:40Z","html_url":"https://github.com/framgia/Alarm_Clock_1/pull/16#discussion_r72375089","pull_request_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments/72375089"},"html":{"href":"https://github.com/framgia/Alarm_Clock_1/pull/16#discussion_r72375089"},"pull_request":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16","id":78449848,"html_url":"https://github.com/framgia/Alarm_Clock_1/pull/16","diff_url":"https://github.com/framgia/Alarm_Clock_1/pull/16.diff","patch_url":"https://github.com/framgia/Alarm_Clock_1/pull/16.patch","issue_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/16","number":16,"state":"open","locked":false,"title":"ref Task#15_AutoStartAlarm","user":{"login":"vtabk2","id":14882186,"avatar_url":"https://avatars.githubusercontent.com/u/14882186?v=3","gravatar_id":"","url":"https://api.github.com/users/vtabk2","html_url":"https://github.com/vtabk2","followers_url":"https://api.github.com/users/vtabk2/followers","following_url":"https://api.github.com/users/vtabk2/following{/other_user}","gists_url":"https://api.github.com/users/vtabk2/gists{/gist_id}","starred_url":"https://api.github.com/users/vtabk2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtabk2/subscriptions","organizations_url":"https://api.github.com/users/vtabk2/orgs","repos_url":"https://api.github.com/users/vtabk2/repos","events_url":"https://api.github.com/users/vtabk2/events{/privacy}","received_events_url":"https://api.github.com/users/vtabk2/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-22T09:36:22Z","updated_at":"2016-07-27T03:17:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1057456df4fd75912a9ec88c95c1627a2da645c0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16/commits","review_comments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16/comments","review_comment_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/16/comments","statuses_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/statuses/d887a88ddd162660fc61dc37520e572c75b59101","head":{"label":"vtabk2:15_AutoStartAlarm","ref":"15_AutoStartAlarm","sha":"d887a88ddd162660fc61dc37520e572c75b59101","user":{"login":"vtabk2","id":14882186,"avatar_url":"https://avatars.githubusercontent.com/u/14882186?v=3","gravatar_id":"","url":"https://api.github.com/users/vtabk2","html_url":"https://github.com/vtabk2","followers_url":"https://api.github.com/users/vtabk2/followers","following_url":"https://api.github.com/users/vtabk2/following{/other_user}","gists_url":"https://api.github.com/users/vtabk2/gists{/gist_id}","starred_url":"https://api.github.com/users/vtabk2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtabk2/subscriptions","organizations_url":"https://api.github.com/users/vtabk2/orgs","repos_url":"https://api.github.com/users/vtabk2/repos","events_url":"https://api.github.com/users/vtabk2/events{/privacy}","received_events_url":"https://api.github.com/users/vtabk2/received_events","type":"User","site_admin":false},"repo":{"id":63028898,"name":"Alarm_Clock_1","full_name":"vtabk2/Alarm_Clock_1","owner":{"login":"vtabk2","id":14882186,"avatar_url":"https://avatars.githubusercontent.com/u/14882186?v=3","gravatar_id":"","url":"https://api.github.com/users/vtabk2","html_url":"https://github.com/vtabk2","followers_url":"https://api.github.com/users/vtabk2/followers","following_url":"https://api.github.com/users/vtabk2/following{/other_user}","gists_url":"https://api.github.com/users/vtabk2/gists{/gist_id}","starred_url":"https://api.github.com/users/vtabk2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtabk2/subscriptions","organizations_url":"https://api.github.com/users/vtabk2/orgs","repos_url":"https://api.github.com/users/vtabk2/repos","events_url":"https://api.github.com/users/vtabk2/events{/privacy}","received_events_url":"https://api.github.com/users/vtabk2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vtabk2/Alarm_Clock_1","description":"Framgia Alarm Clock App (training)","fork":true,"url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1","forks_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/forks","keys_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/teams","hooks_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/hooks","issue_events_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/issues/events{/number}","events_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/events","assignees_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/assignees{/user}","branches_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/branches{/branch}","tags_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/tags","blobs_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/statuses/{sha}","languages_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/languages","stargazers_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/stargazers","contributors_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/contributors","subscribers_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/subscribers","subscription_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/subscription","commits_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/issues/comments{/number}","contents_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/contents/{+path}","compare_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/merges","archive_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/downloads","issues_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/issues{/number}","pulls_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/pulls{/number}","milestones_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/milestones{/number}","notifications_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/labels{/name}","releases_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/releases{/id}","deployments_url":"https://api.github.com/repos/vtabk2/Alarm_Clock_1/deployments","created_at":"2016-07-11T02:01:38Z","updated_at":"2016-07-05T11:48:32Z","pushed_at":"2016-07-27T02:32:08Z","git_url":"git://github.com/vtabk2/Alarm_Clock_1.git","ssh_url":"git@github.com:vtabk2/Alarm_Clock_1.git","clone_url":"https://github.com/vtabk2/Alarm_Clock_1.git","svn_url":"https://github.com/vtabk2/Alarm_Clock_1","homepage":null,"size":1535,"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":"0f5365a352b88e760ea21b5e890143d75a63ba4b","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":62632627,"name":"Alarm_Clock_1","full_name":"framgia/Alarm_Clock_1","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/Alarm_Clock_1","description":"Framgia Alarm Clock App (training)","fork":false,"url":"https://api.github.com/repos/framgia/Alarm_Clock_1","forks_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/forks","keys_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/teams","hooks_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/hooks","issue_events_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/events","assignees_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/tags","blobs_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/languages","stargazers_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/stargazers","contributors_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/contributors","subscribers_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/subscribers","subscription_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/subscription","commits_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/merges","archive_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/downloads","issues_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/labels{/name}","releases_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/Alarm_Clock_1/deployments","created_at":"2016-07-05T11:48:32Z","updated_at":"2016-07-05T11:48:32Z","pushed_at":"2016-07-27T03:14:32Z","git_url":"git://github.com/framgia/Alarm_Clock_1.git","ssh_url":"git@github.com:framgia/Alarm_Clock_1.git","clone_url":"https://github.com/framgia/Alarm_Clock_1.git","svn_url":"https://github.com/framgia/Alarm_Clock_1","homepage":null,"size":1499,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16"},"html":{"href":"https://github.com/framgia/Alarm_Clock_1/pull/16"},"issue":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/16"},"comments":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/Alarm_Clock_1/statuses/d887a88ddd162660fc61dc37520e572c75b59101"}}}}
{"actor":{"display_login":"trungkienvu85"}}