I would like to develop a small app for android and ios devices that is able to access and process motion as well as location data. One requirement is that the app must be able to continue the processing if the app is in the background or the screen turns off.
I know that this is a difficult endeavor, especially for iOS devices, because the app will be suspended quickly by default due to the strict energy management. While there would be suitable „workout sessions“ with background processing capabilities for watchOS, iOS offers other rather restricted „background modes“ (e.g., for playing audio or getting location updates in the background). However, using these background modes, it should be possible to process motion data together with location updates in the background.
My biggest problem right now is that I would like to develop the app with a multi-platform framework (Cordova, React Native, or Flutter). However, there are some concerns:
For Cordova, for example, it offers no multi-threading and no native background processing capabilities. As I need to process motion and location data simultaneously (with a more or less complex algorithm) and update the UI accordingly, I would assume that the architecture of Cordova may be unsuited?
React native, too, does not support native background modes. As for Cordova (where the only background plug-in is 2+ years old), I am not sure how reliable these background processing plugins are. Often, they seem to allow background calculations only periodically, but not continuously.
Flutter is very new, but reading the documentation, to me it is not clear to what extent Flutter supports continuous background processing.
Does someone of you have a suggestion which framework to use to build such an app? The UI would be very simple, only having a few buttons and labels. What both platforms would share would mainly be the processing algortihm – taking numbers as input and outputting a numeric result, too.
Currently, I am considering to develop the app natively for both platforms. However, having a shared code for the algorithm would be absolutely great.
Any help would be highly appreciated. Thank you a lot!