Skip to content
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

Combination with BLE Plugin: No disconnect when app gets closed #32

Closed
pentabarf opened this issue Aug 9, 2021 · 4 comments
Closed

Comments

@pentabarf
Copy link

pentabarf commented Aug 9, 2021

Description
Using this Plugin together with cordova-plugin-ble-central or capacitor-community/bluetooth-le in Android bluetooth connection doesn't get closed when app is closed.

Reproduce

  1. Create an ionic app for Android
  2. install background-geolocation
  3. install cordova-plugin-ble-central or capacitor-community/bluetooth-le
  4. connect a ble device with the app
  5. close the app
  6. device is still connected with phone and therefore doesn't get find when reopen the app
  7. to verify: disable Bluetooth in phone settings after app is closed and the device will notify a disconnect

Expected behavior
Bluetooth connection should get closed when app gets closed

Smartphone

  • Device: Motorola moto g 5G plus, Google Pixel 2
  • OS: Android 10
  • Version 29

Additional context
I am working on a ble-sensor combined with geolocation tracker project

I opened this also as an issue at capacitor-community/bluetooth-le:
capacitor-community/bluetooth-le#158

@diachedelic
Copy link
Collaborator

If you discover a fault in this plugin, please let me know.

@pentabarf
Copy link
Author

Does the Watcher gets removed when closing the app? Or is there any option to do so?

@diachedelic
Copy link
Collaborator

If by "closing" you mean "killing", then yes. If by "closing" you mean "backgrounding", then no. If you only require updates in the foreground, simply omit the backgroundMessage option.

@pentabarf
Copy link
Author

yes i mean "killing"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants