-
-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] IDevice.IsConnected doesnt update when Bluetooth radio is turned off. #822
Comments
Hi @axa88, I'm the friendly issue checker. If you think it's fine to make an exception, just ignore this message. Thanks! |
I cannot confirm this with v3.1.0-beta.2 and .NET 8 (on a Samsung Galaxy S21+ with Android 14). When Bluetooth is disabled, I even see two
|
@janusw Though I was referring to my Q&A in in discussions where |
To simplify my concern here, perhaps you could explain what you believe should happen when the Radio is turned off. Right now as I (eventually) reported, on While I suggest this should be consistent across platforms. Again sorry to confuse this with the |
Upon switching anAndroid
Bluetooth radio off,IDevice.State
remainsOn
and IBluetoothLE.StateChanged event should trigger.Upon switching an
Android
Bluetooth radio off, reportIDevice.IsConnected
is not updated and DeviceConnected doesn't should trigger.In contrast this works properly on
WinUI
Understandably it is debatable what exactly should happen to an
IDevice
after the radio is switched off.I understand on
Android
at least the GATT should be invalidated and arguable these objects be disposed of.But apparently on
WinUI
these objects are still valid for connection.But im reporting the issue as it is undefined and if possible uniform handling across platforms would be desirable.
Steps to reproduce
switch radio
Off
observe
IDevice.IsConnected
remainsOn
observe
DeviceConnected
event doesn't trigger.Expected behavior
Upon switching an Android Bluetooth radio off,
IDevice.State
should propagate toOff
andIBluetoothLE.StateChanged
event should trigger.Actual behavior
Upon switching an
Android
Bluetooth radio off, reportIDevice.State
remainsOn
andIBluetoothLE.StateChanged
event should trigger.Crashlog
none
Configuration
Version of the Plugin:
v3.0.0
Platform:
Not working .NET8 Win10.0.19041.0
Working on .NET8 Android 12/13 target 34
Device: IBM X1 carbon 1, Samsung A11, Samsung A51
The text was updated successfully, but these errors were encountered: