I have a codenameone application, which uses GPS to trace the route. If the application has focus on android, either if the phone is on or locked, is still tracing the route, ie it is receiving the GPS signal (LocationManager -> LocationListener). If the application is in the background, stops transmitting and trace the route.
And if the application that was in the background is now on the focus, all the coordinates were lost. There is more I need to close and start the application, if I need the tracking route.
Are ther some example that shows how to implement this functionality.
I Do not know if I should enable some parameter settings within the application.