Hello There,
I am writing an app that will track the user via GPS and create a path on my MapActivity to show where they have been. The problem for me arises when the user navigates back to home to use other functionality of the phone.
I am looking in my LogCat and it seems my process is dying when I access the Browser, for example. It ceases to work when I am driving and listening to music, but only after a period of time with no other action by me to break it.
The way my MapActivity is set up has been with the launchMode of singleTask and singleInstance, both with the same error occurring. I am running a Runnable from the start of the MapActivity to take care of gathering the GPS location and placing a blip on the map, the runnable is also placed on a new Thread.
Would there be an easier way to do this? Should I somehow create a Service that takes care of the location and blip functionality? How would I prevent the process from dying, and is there a way to see why it is being killed?
(I was playing with Google Navigate, and I want similar functionality to how the GPS location and map state are saved, even when the user goes back to the home screen and messes with other applications.)
Thanks for your help,
-Adam
I am writing an app that will track the user via GPS and create a path on my MapActivity to show where they have been. The problem for me arises when the user navigates back to home to use other functionality of the phone.
I am looking in my LogCat and it seems my process is dying when I access the Browser, for example. It ceases to work when I am driving and listening to music, but only after a period of time with no other action by me to break it.
The way my MapActivity is set up has been with the launchMode of singleTask and singleInstance, both with the same error occurring. I am running a Runnable from the start of the MapActivity to take care of gathering the GPS location and placing a blip on the map, the runnable is also placed on a new Thread.
Would there be an easier way to do this? Should I somehow create a Service that takes care of the location and blip functionality? How would I prevent the process from dying, and is there a way to see why it is being killed?
(I was playing with Google Navigate, and I want similar functionality to how the GPS location and map state are saved, even when the user goes back to the home screen and messes with other applications.)
Thanks for your help,
-Adam