Bluetooth Low Energy On Android: Top Tips For The Tricky Bits @ GDG Detroit



Bluetooth Low Energy (BLE) powers the Internet of Things (IoT): smart watches, smart bulbs, and smart cars all use it for short-range communication. Now that 90% of Android consumer devices and 100% of Android Things devices run software that supports BLE, there’s never been a better time for Android developers to jump into the rapidly-growing IoT ecosystem and start building their own companion apps or custom smart devices.

Unfortunately, Android’s Bluetooth stack has a well-deserved…

15 Comments

  1. i put a hole in my screen pounding the thumbs up.
    Edit add back my initial question:
    So is location required only for scanning?

  2. Finally !!!!!!! A saviour is here!!!!! finally someone taught this in ENGLISH !!!! I am subscribing to this channel!

  3. Wonderful information Stuart – thank you so much for this. Now I might not go mad.

  4. Hi Stuart, first of all thank you so much for this video, I have been doing hybrid mobile app development for the last 2 years(ReactNative and Ionic) most of it has been revolving around Bluetooth Low Energy. We are now producing some new solutions that require the use of Native Android developing, so I wanted to go a little bit deeper to see whats going on on Android.

    Incredible to see how clunky the actual Android implementation of BLE is. I have come across all of these errors when using the hybrid libraries available for these technologies and the only way to get around them is to implement dirty hacks which become an even bigger mess since you have to do it for hybrid. But on the bright side it's getting better. Right now the iOS side has quite a bigger lead in terms of BLE performance and implementation simplicity, but I hope that changes in the future.

    Thank you so much for your video and all the work you have poured into this, as well as sharing it with us. This is one of the best videos I saw on how to deal with the weird Bluedroid stack, and helps immensely in planing steps for anyone trying to make a BLE App.

  5. Thanks for your presentation. About library existing, Nordic SemiConductor has a great open source library and i used it for a BLE project( interaction with Android and iPad app). Check Android nrF Blinky on Github

  6. I seriously thought I was the only one experiencing these problems. Pretty sure it took me a week just to figure out we needed ACCESS_COARSE_LOCATION permission enabled. I know there probably isn't that much motivation to do so but I think the google docs on ble need to be updated. Anyways, awesome presentation! Super helpful!

    Edit: That part on multiple connections is gold.

  7. Nice video!
    Just a correction: you don't need to serialize among all peripherals. It is enough with one queue per BluetoothGatt object, since the Bluetooth stack internally can hold one queued operation per BluetoothGatt object. Also, the only benefit of not calling close directly after disconnect is to avoid getting a warning in the log about an internal NullPointerException. So I would say the workaround isn't really needed unless you want the log clean.

Leave a Reply

Your email address will not be published. Required fields are marked *