Background execution is hard core for mobile. Native platforms make it hard on purpose because you're essentially running all the time and "wasting battery" so they don't really want you to do that.
When the app is in the foreground you can get location constantly using the LocationManager (that's the point you display it on the screen). But when the app is minimized the system will kill your app if you keep doing that (as that's taking a lot of battery). So when stop() is invoked in your main class you need to stop polling location. You can then switch to using background location updates using https://www.codenameone.com/javadoc/com/codename1/location/LocationManager.html#setBackgroundLocationListener-java.lang.Class- notice that it works very differently to the regular location listener. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/9c9f6947-a906-44f1-9a12-8f799ec3e9c1%40googlegroups.com.
