I am trying to connect external BLE devices(Audio speaker) from
SamsungGalaxy S6 and J7 phone. But randomaly getting disconnect callabck
for BLE device
(audio speaker) in our codebase from SamsungGalaxy S6/J7.Our observation is
this disconnect callback coming from Phone OS.
Please find below our code snippet.
Code
private final BluetoothGattCallback connectionCallback = new
BluetoothGattCallback() {
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status, int
newState) {
super.onConnectionStateChange(gatt, status, newState);
if (newState == BluetoothProfile.STATE_CONNECTED) {
// Devices is Connect
} else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
// Disconnect call ocuur frequently from Phone(Samsung S6/J7). No such call
should come from other phone.
}
}
Why Samsung Galaxy S6/J7 send BLE disconnect callback
onConnectionStateChange(){}?
Android Version : Above 5.0
BLE Version : 4.1
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/2eec2da1-e160-4e82-8cc4-969de700c8f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.