-
Notifications
You must be signed in to change notification settings - Fork 609
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
iOS appears to stop receiving advertisements after a while #930
Comments
Hi, |
@favnec5 You tried using Cordova-plugin-bluetoothLE and you don't observe the issue of iOS appearing to stop receiving advertisements? Yea it is strange because on nRF-Connect is receiving advertisements at an acceptable rate (misses some adverts at the given advertising interval), however it doesn't appear to hang and not receive advertisements like what I'm observing. I also have the iOS deprecation warnings sen in #919. I assumed because they are warnings and not errors, there would no significant effect on the plugin. |
Are these scans being run via See doco for this here: https://github.com/don/cordova-plugin-ble-central#startscanwithoptions |
Hi, |
@peitschie However on Android, From testing my App, it appears to be an iOS specific issue where sometimes after ~2mins of scanning (times vary), it doesn't receive more advertisements for a while. Then maybe a few minutes later it resumes. I wonder if iOS has some internal timer that will stop scanning after some time. I also did a quick test using another plugin https://github.com/randdusing/cordova-plugin-bluetoothle for scanning to see if it was an issue with this plugin: Cordova-BLE-central. Running their scanning, my iOS App didn't advertisements after sometime too. So far it appears to be an iOS issue or something to do with my Ionic/Angular App. |
@huiigary |
@favnec5 small correction, with iOS this plugin does allow background scanning to occur 🙂 See https://github.com/don/cordova-plugin-ble-central/#background-scanning-and-notifications-on-ios for implementation details! |
Yes you are right. What I mean is, don't just assume it's that easy. |
@favnec5 My app stays "awake" (the screen is on). What I notice with other App like nRF-connect is that is also stops receiving advertisements after some time too (refer to image below). Next clicked the home screen then went back into nRF-connect and it started to scan again... (at 1058 timestamp) The question is what is iOS doing that it seems to stop scanning? If I dont touch the phone for a while, does it enter some state Im not aware of? @peitschie
Im unable to run the |
I checked my app on my phone with ios 15.6.1 (cordova 11.0.0), the scan don't stop.
Note : A long time ago, i added in config.xml file :
|
hello I did the same, but now I'm asking because scanning in the background doesn't work on my iPhone. |
Hi,
Was wondering if anyone noticed an issue on their iPhone where the using BLE.startScanWithOptions() appears to stop receiving advertisements? Also tested on Android, but I don't seem to observe this issue there.
Also, is it possible for the BLE scan to receive all the advertisements from a device? I seem to be missing advertisements and Im not sure if it is a Cordova issue or a general issue with phones unable to receive all advertisements.
Even using nRF-connect, it seems to be missing advertisements too which suggests that phones are unable to receive all advertisements.
Any comments or thoughts are appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: