-
Notifications
You must be signed in to change notification settings - Fork 16
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
BLE disconnect on Android issue #54
Comments
small addition, BLE device is not switched off, it always on me and working, |
Does the connection closed after you called In my opinion, it's the system's duty to disconnect the BLE device when app closed, and our BLE device did disconnected when I close my app. I found there some cases on the internet that the connection still connected after app closed, but I can't find anything useful... |
@yanshouwang according to connectionStateChanged, connectionState become false. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
This issue is stale because it has been open for 30 days with no activity. |
Trying to connect to BLE "HR monitor" device.
App should auto search all devices, found by name, connect, subscribe characteristic to notify every data change.
await CentralManager.instance.setCharacteristicNotifyState(
characteristic,
state: true,
);
All this steps working fine, data start flowing.
On app close (hide) - App should auto disconnect from device.
On this step I call two actions -
characteristic,
state: false,
);
To stop characteristic subscription
to disconnect from BLE device itself
After application Resume, need to start from the beginning: Search, Connect... but
BLE device not listed in search list anymore.
As I understand, connection with BLE not stopped, and device still attached.
If temporary switch OFF bluetooth on Android, and run Search BLE devices again - "HR monitor" appeared again,
because "pairing" was interrupted and device is ready to be searched and connected
Guide me what i did wrong, or package "bluetooth_low_energy" has an issue when App using CharacteristicNotify
The text was updated successfully, but these errors were encountered: