Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
turn off screen on android
turn off screen on android ¬†using -'android,wakelock,android-wake-lock'
I am trying to turn on and off the display after a certain action happens (Lets just worry about turning the screen off for now). From what I understand from wake lock, this is what I have:
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); ¬†¬†¬†
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "My Tag");
When I read other posts on stackoverflow and else where, they seem to tell me that PARTIAL_WAKE_LOCK will turn the screen off. But if I read the SDK it says that it will only allow the screen to be turned off. So I think this isn't right.
Any hints would be helpful!
Sep 21, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening