Hi,
the fact that you have enough power doesn't matter. OS's kill processes 
that take too much CPU without permission because they want to conserve 
power. That's the OS policy. When you do stuff in the background you can't 
do anything you want.

If you're running in the foreground you can disable the screensaver using   
Display.getInstance().setScreenSaverEnabled(false) which will prevent the 
device from going to sleep and allow you to see what's going on constantly. 
This will solve both your problems and won't require any background 
location logic as your app will be in the foreground unless the user 
presses the home button or something like that.

Background processes in Android and iOS are far more nuanced and painful. 
It seems you don't actually need them.

-- 
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/875030c2-884a-4e53-9f00-dae9f39599b9%40googlegroups.com.

Reply via email to