android - For which kinds of work I need to use CPU WAKE_LOCK in Sleep Mode? -


for kinds of work need use cpu wake lock ? example in sleep mode using telephonymanager getcelllocation(), should use partial_wake_lock in case or not? didn't find info in documentation. p.s. telephonymanager has different api implementation on different devices me looks tricky. thanks.

**flag value                        cpu     screen  keyboard**  partial_wake_lock                    on*    off     off  screen_dim_wake_lock                 on     dim     off  screen_bright_wake_lock              on     bright  off  full_wake_lock                       on     bright  bright 

incase keep getting location regularly when phone screen turned off, use partial wake lock so. above table can see partial wake lock keeps cpu on while screen , keyboard off(you dont require them want location). anyways refer below link more info on wake locks

http://developer.android.com/reference/android/os/powermanager.html

also refer question on so, can helpful

how can keep android service running when screen turned off?


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -