I start an activity in my class Locator.java which starts a locacionListener Service. That activity writes positions to a database. I wonder if when i move to next screens(activities), positions will keep writing to the database, or I would need to go back to Locator.java to keep writting. The same when I minimize the application.
I have thouhgt about using a Service, but I want to be sure I need it.
Other scenary, imagine that I only need the position when I am in one activity. I wonder if in that case a service will improve the performance, as if the GPS module stops between activities, I would need to restart it next time I go back to the activity. I that case a service will keep the module active and next time I go back to the activity it will be quicker to get the position.
I really appreciate your help.
Thanks,
David.
I have implementeed a service when I need to keep doing a task with the Location. But if I want to use the Location in one Activity I will use the tip from DynamicMind. Whereas to keep working with the Location Service when I am in others activities I need a service.