Open pentabarf opened 3 years ago
Unfortunately I wasn't able to reproduce your behavior.
However, in the newest release 1.2.0 there is a new method getConnectedDevices which might be useful for your situation. With this method you should be able to get the connected device without the need for scanning.
Does this solve your problem?
Thanks for the advice with getConnectedDevices. After restarting the app I was able to get a list containing the device but i am not able to disconnect from it.
Did you connect to the device from the app? If you connect from another app or the OS settings, the app is not allowed to disconnect?
I connect from an earlier instance of the app. As i wrote: the device doesn't get disconnect when killing the app whyever because of background-geolocation.
Thanks for the advice with getConnectedDevices. After restarting the app I was able to get a list containing the device but i am not able to disconnect from it.
I have the same problem, it can be reproduced on android 12, but not on android 14.
Description Using this Plugin together with capacitor-community/background-geolocation in Android: bluetooth connection doesn't get closed when app is closed.
Reproduce
Expected behavior Bluetooth connection should get closed when app gets closed
Smartphone
Additional context I am working on a ble-sensor combined with geolocation tracker project
I opened this also as an issue at capacitor-community/background-geolocation: https://github.com/capacitor-community/background-geolocation/issues/32