i'm doing a location grabbing service for my phone. The main activity sets some timing like 10min interval which results in the servicing running polling both gps and network location for the first 1 min then post the result in http then rest for the 9mins. The questions is, does the service get destroyed in deep sleep? if thats the case i'll have to use alarm manager for it?
Asked
Active
Viewed 1,673 times
1 Answers
0
It is not destroyed, it is sleeping. When you wake your phone up it must continue working and getting location updates.
You need to use AlaramManager
or WakeLock

Olegas
- 10,349
- 8
- 51
- 72
-
this post is kinda old. @Olegas would you share code snippet on how to use AlarmManager or WakeLock? – eros Sep 13 '11 at 03:59
-
[link](http://stackoverflow.com/questions/9408496/how-to-prevent-my-app-to-go-sleep-mode) may this help – manita marwa Apr 03 '12 at 09:19
-
Also look at http://stackoverflow.com/questions/2322643/run-a-service-in-the-background-forever-android – Thaddeus Albers Sep 01 '13 at 00:40