tags:

views:

18

answers:

2

Hi!

I've created service which has LocationListener in it. In order to keep service running the service is set as foreground. I have some questions about phone power management and sleeping in that circumstances:

  1. Will phone go to sleep while such service is running?
  2. How can I save power in this stuation?

Thanks in advance!

A: 

Will phone go to sleep while such service is running?

Yes.

CommonsWare
A: 

How about a background Service that periodically gets launched using AlarmManager and goes back to sleep after persisting coordinates to a database or file?

magaio