-
Hello, when I start recording a GPS track, I notice that OsmAnd helpfully preserves this state if my phone restarts (e.g. due to a bug) or if I switch to another Android user and then back again to the user that was recording the track - OsmAnd will continue recording after I unlock into the user session again. I would like to implement the same functionality on one of my other apps. Could somebody point me to the code in OsmAnd that achieves this? I notice there is a RestartActivity.java but how this links to the GPS track recording service, is not obvious to me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Looks like Android restarts the service automatically and calls |
Beta Was this translation helpful? Give feedback.
Looks like Android restarts the service automatically and calls
onStartCommand
with a null Intent, OsmAnd works with this in NavigationService.java.