Reputation: 11768
I am developing a gps tracking for Android i want my application to start when the phone boots up and send gps coordonates from 10 in 10 minutes.
Do i need to use a service or an AlarmManager broadcast receiver can do the job ?
Upvotes: 0
Views: 41
Reputation: 4008
Prefer the AlarmManager over the service if your frequency of getting the geo co-ordinates is much lesser say 1 location in few miutes...
Otherwise if your frequency is much higher say for every 20/30 seconds then prefer service because AlarmManager is quite heavy in the case of few seconds to remind...
Upvotes: 1
Reputation: 4187
You can start service on phone boot and listen for coordinates changes. See this article
Upvotes: 1