Item#1: Discover services on the main thread
By keeping service discovery on the main thread, you ensure a smoother and more predictable experience.
There are nuances in Android's BLE implementation, and many developers have reported quirks and inconsistencies across different Android versions and device manufacturers. One such quirk pertains to the thread on which you interact with the BluetoothGatt
object, especially with discoverServices()
.