{"action":"created","comment":{"url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/comments/27091814","id":27091814,"diff_hunk":"@@ -144,6 +145,24 @@ public void onNotificationSent(BluetoothDevice device, int status) {\n       super.onNotificationSent(device, status);\n       Log.v(TAG, \"Notification sent. Status: \" + status);\n     }\n+\n+    @Override\n+    public void onCharacteristicWriteRequest(BluetoothDevice device, int requestId,\n+        BluetoothGattCharacteristic characteristic, boolean preparedWrite, boolean responseNeeded,\n+        int offset, byte[] value) {\n+      super.onCharacteristicWriteRequest(device, requestId, characteristic, preparedWrite,\n+          responseNeeded, offset, value);\n+      Log.v(TAG, \"Characteristic Write request: \" + Arrays.toString(value));\n+      if (responseNeeded) {\n+        if (offset != 0) {\n+          mGattServer.sendResponse(device, requestId, BluetoothGatt.GATT_INVALID_OFFSET, offset,\n+              value);\n+          return;\n+        }\n+        int status = mCurrentServiceFragment.writeCharacteristic(characteristic, value);","path":"app/src/main/java/io/github/webbluetoothcg/bletestperipheral/Peripheral.java","position":45,"original_position":45,"commit_id":"adb4d2832de18913bd0c15018ca774b3bc179ac6","original_commit_id":"adb4d2832de18913bd0c15018ca774b3bc179ac6","user":{"login":"jyasskin","id":83420,"avatar_url":"https://avatars.githubusercontent.com/u/83420?v=3","gravatar_id":"","url":"https://api.github.com/users/jyasskin","html_url":"https://github.com/jyasskin","followers_url":"https://api.github.com/users/jyasskin/followers","following_url":"https://api.github.com/users/jyasskin/following{/other_user}","gists_url":"https://api.github.com/users/jyasskin/gists{/gist_id}","starred_url":"https://api.github.com/users/jyasskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyasskin/subscriptions","organizations_url":"https://api.github.com/users/jyasskin/orgs","repos_url":"https://api.github.com/users/jyasskin/repos","events_url":"https://api.github.com/users/jyasskin/events{/privacy}","received_events_url":"https://api.github.com/users/jyasskin/received_events","type":"User","site_admin":false},"body":"You should probably write the value regardless of whether a response is needed.","created_at":"2015-03-25T02:53:53Z","updated_at":"2015-03-25T02:53:53Z","html_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android/pull/29#discussion_r27091814","pull_request_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/comments/27091814"},"html":{"href":"https://github.com/WebBluetoothCG/ble-test-peripheral-android/pull/29#discussion_r27091814"},"pull_request":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29","id":31887745,"html_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android/pull/29","diff_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android/pull/29.diff","patch_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android/pull/29.patch","issue_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues/29","number":29,"state":"open","locked":false,"title":"Implementation of Heart Rate Control Point","user":{"login":"g-ortuno","id":3117611,"avatar_url":"https://avatars.githubusercontent.com/u/3117611?v=3","gravatar_id":"","url":"https://api.github.com/users/g-ortuno","html_url":"https://github.com/g-ortuno","followers_url":"https://api.github.com/users/g-ortuno/followers","following_url":"https://api.github.com/users/g-ortuno/following{/other_user}","gists_url":"https://api.github.com/users/g-ortuno/gists{/gist_id}","starred_url":"https://api.github.com/users/g-ortuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g-ortuno/subscriptions","organizations_url":"https://api.github.com/users/g-ortuno/orgs","repos_url":"https://api.github.com/users/g-ortuno/repos","events_url":"https://api.github.com/users/g-ortuno/events{/privacy}","received_events_url":"https://api.github.com/users/g-ortuno/received_events","type":"User","site_admin":false},"body":"This PR contains the implementation of the [Heart Rate Control Point](https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.heart_rate_control_point.xml) characteristic. Since this is a writable characteristic the necessary methods to support writable characteristics are also implemented. After this merge Heart Rate will support `Write`, `Read` and `Notify`.","created_at":"2015-03-25T02:10:46Z","updated_at":"2015-03-25T02:53:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4803023264392e4b214246e466b9f113b2e4800","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29/commits","review_comments_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29/comments","review_comment_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues/29/comments","statuses_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/statuses/adb4d2832de18913bd0c15018ca774b3bc179ac6","head":{"label":"g-ortuno:heart-rate-characteristic-backend","ref":"heart-rate-characteristic-backend","sha":"adb4d2832de18913bd0c15018ca774b3bc179ac6","user":{"login":"g-ortuno","id":3117611,"avatar_url":"https://avatars.githubusercontent.com/u/3117611?v=3","gravatar_id":"","url":"https://api.github.com/users/g-ortuno","html_url":"https://github.com/g-ortuno","followers_url":"https://api.github.com/users/g-ortuno/followers","following_url":"https://api.github.com/users/g-ortuno/following{/other_user}","gists_url":"https://api.github.com/users/g-ortuno/gists{/gist_id}","starred_url":"https://api.github.com/users/g-ortuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g-ortuno/subscriptions","organizations_url":"https://api.github.com/users/g-ortuno/orgs","repos_url":"https://api.github.com/users/g-ortuno/repos","events_url":"https://api.github.com/users/g-ortuno/events{/privacy}","received_events_url":"https://api.github.com/users/g-ortuno/received_events","type":"User","site_admin":false},"repo":{"id":31574255,"name":"ble-test-peripheral-android","full_name":"g-ortuno/ble-test-peripheral-android","owner":{"login":"g-ortuno","id":3117611,"avatar_url":"https://avatars.githubusercontent.com/u/3117611?v=3","gravatar_id":"","url":"https://api.github.com/users/g-ortuno","html_url":"https://github.com/g-ortuno","followers_url":"https://api.github.com/users/g-ortuno/followers","following_url":"https://api.github.com/users/g-ortuno/following{/other_user}","gists_url":"https://api.github.com/users/g-ortuno/gists{/gist_id}","starred_url":"https://api.github.com/users/g-ortuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g-ortuno/subscriptions","organizations_url":"https://api.github.com/users/g-ortuno/orgs","repos_url":"https://api.github.com/users/g-ortuno/repos","events_url":"https://api.github.com/users/g-ortuno/events{/privacy}","received_events_url":"https://api.github.com/users/g-ortuno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/g-ortuno/ble-test-peripheral-android","description":"","fork":true,"url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android","forks_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/forks","keys_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/teams","hooks_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/hooks","issue_events_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/issues/events{/number}","events_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/events","assignees_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/assignees{/user}","branches_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/branches{/branch}","tags_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/tags","blobs_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/statuses/{sha}","languages_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/languages","stargazers_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/stargazers","contributors_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/contributors","subscribers_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/subscribers","subscription_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/subscription","commits_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/contents/{+path}","compare_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/merges","archive_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/downloads","issues_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/issues{/number}","pulls_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/pulls{/number}","milestones_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/milestones{/number}","notifications_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/labels{/name}","releases_url":"https://api.github.com/repos/g-ortuno/ble-test-peripheral-android/releases{/id}","created_at":"2015-03-03T02:01:48Z","updated_at":"2015-03-23T22:32:50Z","pushed_at":"2015-03-25T02:05:19Z","git_url":"git://github.com/g-ortuno/ble-test-peripheral-android.git","ssh_url":"git@github.com:g-ortuno/ble-test-peripheral-android.git","clone_url":"https://github.com/g-ortuno/ble-test-peripheral-android.git","svn_url":"https://github.com/g-ortuno/ble-test-peripheral-android","homepage":null,"size":483,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"WebBluetoothCG:master","ref":"master","sha":"61f1dbe30f5434740cdf913a0e0d1407adb7f293","user":{"login":"WebBluetoothCG","id":8389284,"avatar_url":"https://avatars.githubusercontent.com/u/8389284?v=3","gravatar_id":"","url":"https://api.github.com/users/WebBluetoothCG","html_url":"https://github.com/WebBluetoothCG","followers_url":"https://api.github.com/users/WebBluetoothCG/followers","following_url":"https://api.github.com/users/WebBluetoothCG/following{/other_user}","gists_url":"https://api.github.com/users/WebBluetoothCG/gists{/gist_id}","starred_url":"https://api.github.com/users/WebBluetoothCG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebBluetoothCG/subscriptions","organizations_url":"https://api.github.com/users/WebBluetoothCG/orgs","repos_url":"https://api.github.com/users/WebBluetoothCG/repos","events_url":"https://api.github.com/users/WebBluetoothCG/events{/privacy}","received_events_url":"https://api.github.com/users/WebBluetoothCG/received_events","type":"Organization","site_admin":false},"repo":{"id":31573151,"name":"ble-test-peripheral-android","full_name":"WebBluetoothCG/ble-test-peripheral-android","owner":{"login":"WebBluetoothCG","id":8389284,"avatar_url":"https://avatars.githubusercontent.com/u/8389284?v=3","gravatar_id":"","url":"https://api.github.com/users/WebBluetoothCG","html_url":"https://github.com/WebBluetoothCG","followers_url":"https://api.github.com/users/WebBluetoothCG/followers","following_url":"https://api.github.com/users/WebBluetoothCG/following{/other_user}","gists_url":"https://api.github.com/users/WebBluetoothCG/gists{/gist_id}","starred_url":"https://api.github.com/users/WebBluetoothCG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebBluetoothCG/subscriptions","organizations_url":"https://api.github.com/users/WebBluetoothCG/orgs","repos_url":"https://api.github.com/users/WebBluetoothCG/repos","events_url":"https://api.github.com/users/WebBluetoothCG/events{/privacy}","received_events_url":"https://api.github.com/users/WebBluetoothCG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android","description":"","fork":false,"url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android","forks_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/forks","keys_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/teams","hooks_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/hooks","issue_events_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues/events{/number}","events_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/events","assignees_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/assignees{/user}","branches_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/branches{/branch}","tags_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/tags","blobs_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/statuses/{sha}","languages_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/languages","stargazers_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/stargazers","contributors_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/contributors","subscribers_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/subscribers","subscription_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/subscription","commits_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/contents/{+path}","compare_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/merges","archive_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/downloads","issues_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues{/number}","pulls_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls{/number}","milestones_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/milestones{/number}","notifications_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/labels{/name}","releases_url":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/releases{/id}","created_at":"2015-03-03T01:30:48Z","updated_at":"2015-03-24T23:44:11Z","pushed_at":"2015-03-25T02:10:46Z","git_url":"git://github.com/WebBluetoothCG/ble-test-peripheral-android.git","ssh_url":"git@github.com:WebBluetoothCG/ble-test-peripheral-android.git","clone_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android.git","svn_url":"https://github.com/WebBluetoothCG/ble-test-peripheral-android","homepage":null,"size":609,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29"},"html":{"href":"https://github.com/WebBluetoothCG/ble-test-peripheral-android/pull/29"},"issue":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues/29"},"comments":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/WebBluetoothCG/ble-test-peripheral-android/statuses/adb4d2832de18913bd0c15018ca774b3bc179ac6"}}}}