{"id":1330,"date":"2022-11-07T09:05:13","date_gmt":"2022-11-07T09:05:13","guid":{"rendered":"https:\/\/www.beaconzone.co.uk\/blog\/?p=1330"},"modified":"2022-11-07T09:05:15","modified_gmt":"2022-11-07T09:05:15","slug":"working-with-gatt-on-android","status":"publish","type":"post","link":"https:\/\/www.beaconzone.co.uk\/blog\/working-with-gatt-on-android\/","title":{"rendered":"Working with GATT on Android"},"content":{"rendered":"\n<p>Most of the time, beacons transmit and the receiving software such as apps on iOS and Android or applications on single board computers (SBC) only read the advertising data. There&#8217;s no connection to the beacon. However, for programmatic setup of beacon parameters or accessing some sensor data, applications might need to connect via what&#8217;s known as Bluetooth GATT.<\/p>\n\n\n\n<p>There&#8217;s an article on <a rel=\"noreferrer noopener\" href=\"https:\/\/intersog.com\/blog\/code\/how-to-work-properly-with-bt-le-on-android\/\" target=\"_blank\">How to Work Properly With BT LE On Android<\/a>. It provides some useful pointers such as not performing scanning and GATT connection simultaneously, avoiding auto-connect and not blocking GATT callbacks.<\/p>\n\n\n\n<p>GATT can be unreliable on Android. While scanning for advertising data usually works very well, we have found that GATT connections fail all the time on about 5% of devices. This is due to poorly implemented OS Bluetooth software. This means beacon manufacturer-supplied configuration apps sometimes can&#8217;t connect. The only solution is to use a different phone (or the iOS version of the app on iPhone).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of the time, beacons transmit and the receiving software such as apps on iOS and Android or applications on single board computers (SBC) only read the advertising data. There&#8217;s no connection to the beacon. However, for programmatic setup of beacon parameters or accessing some sensor data, applications might need to connect via what&#8217;s known &hellip; <a href=\"https:\/\/www.beaconzone.co.uk\/blog\/working-with-gatt-on-android\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Working with GATT on Android&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,87,100],"tags":[],"_links":{"self":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1330"}],"collection":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1330"}],"version-history":[{"count":5,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1330\/revisions"}],"predecessor-version":[{"id":8060,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1330\/revisions\/8060"}],"wp:attachment":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}