You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to detect the device shutdown when the app is already connected. At the moment I dont see an approch to do this on android.
I listen to observeConnectionState, but this stream is not emiting anything on device disconnect.
_bleDeviceConnectionStateSubscription = peripheral
.observeConnectionState(
emitCurrentValue: false, completeOnDisconnect: true)
.listen((connectionState) {
print(
"Peripheral ${device.peripheral.identifier} connection state is $connectionState");
_bleDeviceConnectionStateSubject.add(connectionState);
});
I also tired calling isConnected method, however even when device is shutdown it returns true.
var connection = await _bleDevice.peripheral.isConnected();
Is there a way to monitor device side disconnection and show a message to the user.
The text was updated successfully, but these errors were encountered:
patolax
changed the title
Device disconnection is not detected
Device disconnection is not detected on android
Oct 18, 2021
patolax
changed the title
Device disconnection is not detected on android
Device side disconnection is not detected on android
Oct 18, 2021
I want to detect the device shutdown when the app is already connected. At the moment I dont see an approch to do this on android.
I also tired calling isConnected method, however even when device is shutdown it returns true.
var connection = await _bleDevice.peripheral.isConnected();
Is there a way to monitor device side disconnection and show a message to the user.
The text was updated successfully, but these errors were encountered: