Android Lollipop: Bluetooth LE Matures
Why Stack Overflow recommends it
Stack Overflow users link it when answering Android BLE questions about Lollipop-era changes, connection limits and getting started with BLE development.
Recommended by 2 people across 2 different months, 2015 to 2021.
What it is
A recorded AnDevCon San Francisco session by Dave Smith, published by InfoQ, on what Android 5.0 Lollipop changed for Bluetooth LE. It follows his earlier tutorial on the basics introduced in Android 4.3 and covers the new APIs and behavior in the 5.0 release.
What people said
Recommends Marian Paździoch · 2015-04 · Stack Overflow · on “Android 4.4.4 Moto G Bluetooth LE reconnect issue”
I think there will not be an easy answer like "use Main Thread" and everything is OK. But I can give you some hints I gathered while working with crappy Android BLE: BT stack will be different on different phones, unfortunately Moto G is one of most crappiest phones if we're talking about BLE... how crappy? Tile app even states in their F.A.Q What Android phones will Tile work with [LINK] : will work only with Samsung Galaxy S5, HTC One M8, HTC One, LG Nexus 4, LG Nexus 5, LG Nexus 6, Samsung Note 4, Motorola Moto X and certainly will not work with Moto G try to aim in Android 5.0 and above, this official video from google says so [LINK] and furthermore in here Android Lollipop: Bluetooth LE
Recommends DuyTranCS · 2015-09 · Stack Overflow · on “How to create multiple connection at same time in Android bluetooth low energy (BLE)?”
You are going to handle each BLE device by creating each BluetoothGattCallback for each one. for example like: private final BluetoothGattCallback oneGattcallback = new BluetoothGattCallback() ... private final BluetoothGattCallback twoGattcallback = new BluetoothGattCallback() ... then try to connect mBluetoothGattA = deviceA.connectGatt(this, false, oneGattcallback ); and mBluetoothGattB = deviceB.connectGatt(this, false, twoGattcallback ); just like that. you will find a lot examples handle one connection and just develop more for multiple connection. Besides, checkout this video [this video] show that max concurrent GATT connections is (4) Android 4.5 and (7) Android 4.4+
Cites tim-montague · 2015-11 · Stack Overflow · on “cordova/phonegap bluetooth phone to phone send and receive message”
Short Answer Your bracelet is running a GATT server which advertises bluetooth packets, and you're phone is not. There aren't any PhoneGap plugins that allow your phone to run a GATT server. You'll need to create your own PhoneGap plugin. Long Answer If you want to exchange bluetooth data between two phones, both phones need to support bluetooth low energy, so that the second phone can run a GATT server. In bluetooth low energy, the phone that's scanning is known as the central device, and the phone that's advertising is known as the peripheral device. As of today (Nov 15, 2015), only the newest phones and operating systems support the ability for a phone to act as a peripheral device (i.e.
Cites stkent · 2017-03 · Stack Overflow · on “Android Bluetooth Low Energy Characteristic notification count limit: does this vary by device?”
Context I am building an Android app targeting 5.0+ that uses BLE to connect to multiple peripherals. Each of these peripherals has many (~10) characteristics. Ideally, I would like to subscribe to notifications of changes for every single one of these characteristics. However, my understanding from reading around is that Android's Bluetooth implementations enforce a hard limit on the number of simultaneous notifications that can be active. This question [LINK] identifies where the limit is defined within the Android Bluetooth implementation [LINK] , and also notes how the limit has changed over time: Max concurrent active notifications ( BTA_GATTC_NOTIF_REG_MAX ): 4 on Android 4.3 7 on Andr
Cites Youssif Saeed · 2021-03 · Stack Overflow · on “Android BLE scan issue”
You also need to have ACCESS_BACKGROUND_LOCATION declared in order to find other Bluetooth devices. You can find more information here:- [LINK] Bluetooth LE Scan fails in the background - permissions [LINK] Turn on Android LE scanning without asking user for permission [LINK] And the links below are useful for getting started with Android LE Development:- The Ultimate Guide to Android BLE Development [LINK] Android Lollipop: Bluetooth LE Matures [this video] Bluetooth LE Send String Data between Devices [LINK]