02-29-2012 08:44 AM
Hey Guys, I want to make an app that keeps the screen of PlayBook always on.
In my Android code I have done following:
Called setKeepScreenOn(true); on one of my images
Added permission: android.permission.KEEP_SCREEN_ON
This has no effect on the screen.
The screen settings of Playbook are still effective and BackLight Time-out and Stand-By Time out work as they are working in the other apps. Can somebody help?
Please note that the Android devices are working fine, I can get the KEEP_SCREEN_ON working on Android and the phones and tabs running on android will drain the battery but will not go off.
02-29-2012 09:16 AM
02-29-2012 09:25 AM
Thanks for your tip, but that didn't work as well. Screen goes off after 30 seconds (that's what I've set in settings on OS)
Any other ideas?
Not off the top of my head -- if I think of anything I will post back here.
Hopefully someone can help you before then.
02-29-2012 09:50 AM
Haven't tried on an actual playbook but at least my apps got approved so the functionality should be there - check for other types of wake locks to get the right one for you:
PowerManager pm = (PowerManager) this.getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK /*SCREEN_DIM_WAKE_LOCK*/, "RunGame");
02-29-2012 10:02 AM
Thanks for the help @marklogan but that did not help.
Can you please send me a link to the app so that i can try it out if ur app keeps a wake lock on real device or not?
03-20-2012 03:01 AM
I've double checked. This is a BB Playbook issue in their Android implementation. I've created a bug report. Vote for that if you want WakeLock to be implemented.
Android: PowerManager.WakeLock is not working
03-21-2012 12:37 PM
This issue affects my Android app as well, and I've also voted on it and added my comments. Thanks for creating the bug report! I'm glad there was already a forum thread and bug for this, otherwise I would have been banging my head against the wall trying to get this to work! This should definitely be implemented! I really don't see how any Android apps that display changing info on the screen without requiring user interaction can correctly function otherwise! Wouldn't this even affect video playback in android apps? I can't believe it's not implemented.