{"id":219,"date":"2019-07-13T11:11:21","date_gmt":"2019-07-13T02:11:21","guid":{"rendered":"http:\/\/www.space4u.co.kr\/wp\/?p=219"},"modified":"2019-07-13T11:11:23","modified_gmt":"2019-07-13T02:11:23","slug":"%eb%b8%94%eb%a3%a8%ed%88%ac%ec%8a%a4-characteristic-%ec%a1%b0%ed%9a%8c","status":"publish","type":"post","link":"http:\/\/www.space4u.co.kr\/wp\/?p=219","title":{"rendered":"\ube14\ub8e8\ud22c\uc2a4 Characteristic \uc870\ud68c"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">{\n    List&lt;BluetoothGattService> gattServices = bBluetoothLeService.<em>agetInstance<\/em>().<strong>lmBGatt<\/strong>.getServices();\n\n    <strong>if <\/strong>( gattServices == <strong>null <\/strong>)\n    {\n        <strong>return<\/strong>;\n    }\n    String uuid = <strong>null<\/strong>;\n    String unknownServiceString = <strong>\"\ubaa8\ub974\ub294 \uc11c\ube44\uc2a4\"<\/strong>;\n    String unknownCharaString = <strong>\"\ubaa8\ub974\ub294 \ud2b9\uc131\"<\/strong>;\n\n    ArrayList&lt;HashMap&lt;String, String>> gattServiceData = <strong>new <\/strong>ArrayList&lt;HashMap&lt;String, String>>();\n    ArrayList&lt;ArrayList&lt;HashMap&lt;String, String>>> gattCharacteristicData = <strong>new <\/strong>ArrayList&lt;ArrayList&lt;HashMap&lt;String, String>>>();\n    ArrayList&lt;ArrayList&lt;BluetoothGattCharacteristic>> mGattCharacteristics = <strong>new <\/strong>ArrayList&lt;ArrayList&lt;BluetoothGattCharacteristic>>();\n\n    <em>\/\/ Loops through available GATT Services.\n    <\/em><strong>for <\/strong>( BluetoothGattService gattService : gattServices )\n    {\n        HashMap&lt;String, String> currentServiceData = <strong>new <\/strong>HashMap&lt;String, String>();\n        uuid = gattService.getUuid().toString();\n\n        gattServiceData.add( currentServiceData );\n\n        ArrayList&lt;HashMap&lt;String, String>> gattCharacteristicGroupData = <strong>new <\/strong>ArrayList&lt;HashMap&lt;String, String>>();\n        List&lt;BluetoothGattCharacteristic> gattCharacteristics = gattService.getCharacteristics();\n        ArrayList&lt;BluetoothGattCharacteristic> charas = <strong>new <\/strong>ArrayList&lt;BluetoothGattCharacteristic>();\n\n        <em>\/\/ Loops through available Characteristics.\n        <\/em><strong>for <\/strong>( BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics )\n        {\n            charas.add( gattCharacteristic );\n            HashMap&lt;String, String> currentCharaData = <strong>new <\/strong>HashMap&lt;String, String>();\n            uuid = gattCharacteristic.getUuid().toString();\n            gattCharacteristicGroupData.add( currentCharaData );\n\n            List&lt;BluetoothGattDescriptor> diss = gattCharacteristic.getDescriptors();\n            <strong>for <\/strong>( BluetoothGattDescriptor d : diss )\n            {\n\n                uuid = d.getUuid().toString();\n                uuid = d.getUuid().toString();\n\n\n            }\n        }\n        mGattCharacteristics.add( charas );\n        gattCharacteristicData.add( gattCharacteristicGroupData );\n    }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>{ List&lt;BluetoothGattService> gattServices = bBluetoothLeService.agetInstance().lmBGatt.getServices(); if ( gattServices == null ) { return; } String uuid = null; String unknownServiceString = &#8220;\ubaa8\ub974\ub294 \uc11c\ube44\uc2a4&#8221;; String unknownCharaString&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.space4u.co.kr\/wp\/?p=219\">\ub354 \uc77d\uae30<span class=\"screen-reader-text\">\ube14\ub8e8\ud22c\uc2a4 Characteristic \uc870\ud68c<\/span> <i class=\"fas fa-angle-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[14,148,147],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/219"}],"collection":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":2,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":260,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions\/260"}],"wp:attachment":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}