{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/CaroGame_02/pulls/comments/81574669","pull_request_review_id":2544435,"id":81574669,"diff_hunk":"@@ -69,4 +179,32 @@ public void onReceive(Context context, Intent intent) {\n             devices.add(device.getName() + \"\\n\" + device.getAddress());\n         }\n     };\n+\n+    public synchronized void connected(BluetoothSocket socket, BluetoothDevice\n+        device, final String socketType) {\n+        stopForConnectedNode();\n+        connectedNode = new ConnectedNode(socket, socketType);\n+        connectedNode.start();\n+        Message msg = handler.obtainMessage(ServicesDef.MessageType.toInt(ServicesDef.MessageType\n+            .DEVICE_NAME));\n+        Bundle bundle = new Bundle();\n+        bundle.putString(ServicesDef.DEVICE_NAME, device.getName());\n+        msg.setData(bundle);\n+        handler.sendMessage(msg);\n+        ConnectionState.getInstance().setState(ConnectionState.State.STATE_CONNECTED);\n+    }\n+\n+    public synchronized void connect(BluetoothDevice device, boolean secure) {\n+        if (connectThread != null) {\n+            connectThread.cancel();\n+            connectThread = null;\n+        }\n+        if (connectedNode != null) {","path":"app/src/main/java/com/framgia/carogame/BluetoothConnection.java","position":192,"original_position":192,"commit_id":"6fb12d364c893adf1f0e0df34b2f237983630ca6","original_commit_id":"6fb12d364c893adf1f0e0df34b2f237983630ca6","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":"Don't repeat yourself!","created_at":"2016-10-03T15:29:48Z","updated_at":"2016-10-03T15:29:48Z","html_url":"https://github.com/framgia/CaroGame_02/pull/10#discussion_r81574669","pull_request_url":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/framgia/CaroGame_02/pulls/comments/81574669"},"html":{"href":"https://github.com/framgia/CaroGame_02/pull/10#discussion_r81574669"},"pull_request":{"href":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10","id":87466676,"html_url":"https://github.com/framgia/CaroGame_02/pull/10","diff_url":"https://github.com/framgia/CaroGame_02/pull/10.diff","patch_url":"https://github.com/framgia/CaroGame_02/pull/10.patch","issue_url":"https://api.github.com/repos/framgia/CaroGame_02/issues/10","number":10,"state":"open","locked":false,"title":"Make connect between devices ","user":{"login":"congtung10t2","id":10750828,"avatar_url":"https://avatars.githubusercontent.com/u/10750828?v=3","gravatar_id":"","url":"https://api.github.com/users/congtung10t2","html_url":"https://github.com/congtung10t2","followers_url":"https://api.github.com/users/congtung10t2/followers","following_url":"https://api.github.com/users/congtung10t2/following{/other_user}","gists_url":"https://api.github.com/users/congtung10t2/gists{/gist_id}","starred_url":"https://api.github.com/users/congtung10t2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/congtung10t2/subscriptions","organizations_url":"https://api.github.com/users/congtung10t2/orgs","repos_url":"https://api.github.com/users/congtung10t2/repos","events_url":"https://api.github.com/users/congtung10t2/events{/privacy}","received_events_url":"https://api.github.com/users/congtung10t2/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-30T10:03:55Z","updated_at":"2016-10-03T15:39:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5017147cae8c56c167b374cf7b09d02f8ccca636","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10/commits","review_comments_url":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10/comments","review_comment_url":"https://api.github.com/repos/framgia/CaroGame_02/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/CaroGame_02/issues/10/comments","statuses_url":"https://api.github.com/repos/framgia/CaroGame_02/statuses/6fb12d364c893adf1f0e0df34b2f237983630ca6","head":{"label":"congtung10t2:connected_device","ref":"connected_device","sha":"6fb12d364c893adf1f0e0df34b2f237983630ca6","user":{"login":"congtung10t2","id":10750828,"avatar_url":"https://avatars.githubusercontent.com/u/10750828?v=3","gravatar_id":"","url":"https://api.github.com/users/congtung10t2","html_url":"https://github.com/congtung10t2","followers_url":"https://api.github.com/users/congtung10t2/followers","following_url":"https://api.github.com/users/congtung10t2/following{/other_user}","gists_url":"https://api.github.com/users/congtung10t2/gists{/gist_id}","starred_url":"https://api.github.com/users/congtung10t2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/congtung10t2/subscriptions","organizations_url":"https://api.github.com/users/congtung10t2/orgs","repos_url":"https://api.github.com/users/congtung10t2/repos","events_url":"https://api.github.com/users/congtung10t2/events{/privacy}","received_events_url":"https://api.github.com/users/congtung10t2/received_events","type":"User","site_admin":false},"repo":{"id":68998895,"name":"CaroGame_02","full_name":"congtung10t2/CaroGame_02","owner":{"login":"congtung10t2","id":10750828,"avatar_url":"https://avatars.githubusercontent.com/u/10750828?v=3","gravatar_id":"","url":"https://api.github.com/users/congtung10t2","html_url":"https://github.com/congtung10t2","followers_url":"https://api.github.com/users/congtung10t2/followers","following_url":"https://api.github.com/users/congtung10t2/following{/other_user}","gists_url":"https://api.github.com/users/congtung10t2/gists{/gist_id}","starred_url":"https://api.github.com/users/congtung10t2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/congtung10t2/subscriptions","organizations_url":"https://api.github.com/users/congtung10t2/orgs","repos_url":"https://api.github.com/users/congtung10t2/repos","events_url":"https://api.github.com/users/congtung10t2/events{/privacy}","received_events_url":"https://api.github.com/users/congtung10t2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/congtung10t2/CaroGame_02","description":"Caro Game (Training)","fork":true,"url":"https://api.github.com/repos/congtung10t2/CaroGame_02","forks_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/forks","keys_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/teams","hooks_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/hooks","issue_events_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/issues/events{/number}","events_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/events","assignees_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/assignees{/user}","branches_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/branches{/branch}","tags_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/tags","blobs_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/git/refs{/sha}","trees_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/statuses/{sha}","languages_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/languages","stargazers_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/stargazers","contributors_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/contributors","subscribers_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/subscribers","subscription_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/subscription","commits_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/commits{/sha}","git_commits_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/git/commits{/sha}","comments_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/comments{/number}","issue_comment_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/issues/comments{/number}","contents_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/contents/{+path}","compare_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/merges","archive_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/downloads","issues_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/issues{/number}","pulls_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/pulls{/number}","milestones_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/milestones{/number}","notifications_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/labels{/name}","releases_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/releases{/id}","deployments_url":"https://api.github.com/repos/congtung10t2/CaroGame_02/deployments","created_at":"2016-09-23T07:07:52Z","updated_at":"2016-09-19T05:56:34Z","pushed_at":"2016-10-03T09:21:14Z","git_url":"git://github.com/congtung10t2/CaroGame_02.git","ssh_url":"git@github.com:congtung10t2/CaroGame_02.git","clone_url":"https://github.com/congtung10t2/CaroGame_02.git","svn_url":"https://github.com/congtung10t2/CaroGame_02","homepage":null,"size":59,"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":"46bb3a1d8e21deedfa2a5a0a1de595165eed13c7","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":68573677,"name":"CaroGame_02","full_name":"framgia/CaroGame_02","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/CaroGame_02","description":"Caro Game (Training)","fork":false,"url":"https://api.github.com/repos/framgia/CaroGame_02","forks_url":"https://api.github.com/repos/framgia/CaroGame_02/forks","keys_url":"https://api.github.com/repos/framgia/CaroGame_02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/CaroGame_02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/CaroGame_02/teams","hooks_url":"https://api.github.com/repos/framgia/CaroGame_02/hooks","issue_events_url":"https://api.github.com/repos/framgia/CaroGame_02/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/CaroGame_02/events","assignees_url":"https://api.github.com/repos/framgia/CaroGame_02/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/CaroGame_02/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/CaroGame_02/tags","blobs_url":"https://api.github.com/repos/framgia/CaroGame_02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/CaroGame_02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/CaroGame_02/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/CaroGame_02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/CaroGame_02/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/CaroGame_02/languages","stargazers_url":"https://api.github.com/repos/framgia/CaroGame_02/stargazers","contributors_url":"https://api.github.com/repos/framgia/CaroGame_02/contributors","subscribers_url":"https://api.github.com/repos/framgia/CaroGame_02/subscribers","subscription_url":"https://api.github.com/repos/framgia/CaroGame_02/subscription","commits_url":"https://api.github.com/repos/framgia/CaroGame_02/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/CaroGame_02/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/CaroGame_02/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/CaroGame_02/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/CaroGame_02/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/CaroGame_02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/CaroGame_02/merges","archive_url":"https://api.github.com/repos/framgia/CaroGame_02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/CaroGame_02/downloads","issues_url":"https://api.github.com/repos/framgia/CaroGame_02/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/CaroGame_02/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/CaroGame_02/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/CaroGame_02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/CaroGame_02/labels{/name}","releases_url":"https://api.github.com/repos/framgia/CaroGame_02/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/CaroGame_02/deployments","created_at":"2016-09-19T05:56:34Z","updated_at":"2016-09-19T05:56:34Z","pushed_at":"2016-10-03T09:21:14Z","git_url":"git://github.com/framgia/CaroGame_02.git","ssh_url":"git@github.com:framgia/CaroGame_02.git","clone_url":"https://github.com/framgia/CaroGame_02.git","svn_url":"https://github.com/framgia/CaroGame_02","homepage":null,"size":180,"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/CaroGame_02/pulls/10"},"html":{"href":"https://github.com/framgia/CaroGame_02/pull/10"},"issue":{"href":"https://api.github.com/repos/framgia/CaroGame_02/issues/10"},"comments":{"href":"https://api.github.com/repos/framgia/CaroGame_02/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/CaroGame_02/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/CaroGame_02/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/CaroGame_02/statuses/6fb12d364c893adf1f0e0df34b2f237983630ca6"}}}}
{"actor":{"display_login":"trungkienvu85"}}