What stays alive in background mode with a Mendix native application?

4
Hi guys. I’ve been trying to implement a geofencing application in Mendix, thus far it went okay. I’ve created a fully functional application but it doesn’t work in the background. After some research and some recommendations from the forum and the slack community, I’ve tried to create a Mendix native app that uses the required libraries/modules (https://github.com/eddieowens/react-native-boundary). I’ve been able to implement this library and it works whenever it’s in the foreground. But now my question is, what actually stays alive of the Mendix application when you minimize your application (running in the background on your phone). I don’t see any clear answers online. I want to know this because when you use the library as I did you can determine what should happen when your user enters a zone. However, as far as I know/understand you can’t really determine this in a javascript action or w/e because all these won’t work when the application is in the background. If anyone knows more about this topic, feel free to explain :)   
asked
1 answers
1

Good question!

When the app is moved to the background, all active processes are suspended, for good reasons. So you can do any fun stuff without making it explicit running in the background. The Android and iOS are not fond on those processes as they consume power and drain the batteries. 

So far there is not something already available in the apps. If there is a need, you have build something yourself. But you will stay limited by the OS limitations, and those are not always transparent.. 

https://blog.expo.io/how-to-run-background-tasks-in-react-native-e1619acef48f

https://github.com/jamesisaac/react-native-background-task

Personal, I did not tried it yet, so please let us know if this can work at all? Do you have access to the full Mendix API and session information?

Cheers, Andries

 

 

answered