BLE peripheral connect / disconnect detection #1041
Replies: 1 comment 3 replies
-
I can look into adding an OnDisconnected event to the delegate in a future version. |
Beta Was this translation helpful? Give feedback.
-
I can look into adding an OnDisconnected event to the delegate in a future version. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello to everybody,
I am trying to use Shiny on an Androd Xamarin Forms app just for:
I do not need to actively Connect() to a device, since it is a speaker/mic that is already paired with Android and auto-connects without problems.
So my first approach was to enumerate connected devices (to the OS) in a polling low-frequency task, but it seems i never get any peripherals.
It seems that it would return only peripherals "connected through the app" ?
The in resorted to using a BleDelegate, initialized at startups, that correctly receives OnConnect() callbacks.
I am able to detect if the device auto-connects while the app is already opened now, but i don't know how to detect disconnection, since the subscription to the WhenDisconnected() is received in a strange way and never when there is a real disconnection.
Documentation couldn't help and I cannot find samples for the first approach, that would be the best I think, handling both cases when the devices are already connected when the app is started, or just auto-connect later.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions