androidioscapacitorandroid-dozebackground-mode

Behaviour of Android / iOS when receiving Bluetooth LE communcation during doze


I'm developing an app in Ionic/Capacitor/Vue for both iOS and Android, but now I am in need of some guidance.

The app will communicate with a satellite antenna over Bluetooth LE. I'm using https://github.com/katzer/cordova-plugin-background-mode to keep the app running even when the screen is off. However I'm not in control of the antenna firmware, and so far haven't been able to test what happens if the antenna sends some packet while the screen is off or the app is in the background. What I'm hoping would happen is that the app would act on the incoming communication, even if it's in the background.

Also, the background-mode plugin has this warning on its website: Infinite background tasks are not official supported on most mobile operation systems and thus not compliant with public store vendors. A successful submssion isn't garanteed.

I need to have this app published on both App Store and Play Store. What other options do I have?


Solution

  • There are two up-to-date plugins which help running background tasks on Android:

    Please note that I am the project owner.

    On iOS you should only need to use the Bluetooth LE plugin without additional plugins.