Android Question [CLOSED] Get the current PhoneWakeState ?

lemonisdead

Well-Known Member
Licensed User
Hello,
Do we have a way to get the current WakeState not to release it by chance if any other app is relying on it ?
Many thanks for that
 

udg

Expert
Licensed User
Never used wake locks before, but maybe you could set an intent in your Manifest so to have a service in your app called when a wake lock is set by some other app.
I didn't see any "check wake state" functions in Android PowerManager.

udg
 

lemonisdead

Well-Known Member
Licensed User
Thanks udg. But as the Phone library is able to return if the changed state was already held or not, I guess we should be able to read the current state. BTW thanks for having pointed me to the PowerManager. I'll do some more searches.
 

lemonisdead

Well-Known Member
Licensed User
Excuse, I don't get it : if the Phone library is able to tell us that the wanted state was already acquired can't we get the value before to modify it ?
Sorry for the newbie question because I don't have a "understanding" of the question.
 

lemonisdead

Well-Known Member
Licensed User
OK. Thank you very much. I now understand :)
 
Top