-
Notifications
You must be signed in to change notification settings - Fork 513
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
BleManager in background mode #1177
Comments
We are aware of issues with background modes on Android and this has been added to our road map of issues that we will address. Given our categorization of problems, this will be addressed next month. Unfortunately, we are unable to help with this problem right now. |
@dominik-czupryna-withintent Thank you for your reply! I believe I've already found a response to the issue. The BleManager can only scan for BLE devices or normal Bluetooth devices in the background with the help of a library like background-fetch, but it can only do so in the foreground, not in the background (when the app is minimized). This is because the scanner is an active action. For example, if I start the scanner in the background (using background-fetch), it will run and you can interact with other views and features in your app. However, when you minimize the app (e.g., switch to another app or return to the home screen), the scanner stops. It doesn't crash, but it won't find any devices either. PS: I'm sharing my research here, but I'm not 100% sure and I'm open to new perspectives. Cheers! |
Is this also an issue On IOS as i am facing the same thing there i cannot seem to find a way to have the ble manager run in background mode after pushing to testflight |
Hello! I hope you are doing well. Based on what I have studied and learned, Bluetooth is considered an 'active and blocking feature,' which means that by default, we cannot run the Bluetooth scanner in the background due to its high battery consumption and other operating system requirements. In my project, I have implemented the scanner to run in the foreground. **_
_** |
Suppose I'm already connected with BLE device and then I minimise app and go to home or other app, in this case, will I continue to get data from the Bluetooth device or connection be terminated? |
Why this doesnt work for me?
I have this on the same way you do - all permitions, AndroidManifest and Gradle changes to support that, but i really cant run the BleManager in Background mode. The scanner is mounted, but never running...?
When in foreground he can find devices, but in background he only "starts" the scanner, but never really starts the scanner so I can find a new devices...
Really apreciate any help!
Originally posted by @lsantosmorecolab in #529 (comment)
The text was updated successfully, but these errors were encountered: