**Is there any way by which we can keep screen always on through out the application but it should go for dim also after some time and again wake up once we touch, please help on it Thanks in advance
Asked
Active
Viewed 200 times
0
-
Google it...what have u tried?? – Navdroid Feb 15 '13 at 07:33
-
http://stackoverflow.com/questions/3723634/how-do-i-prevent-an-android-device-from-going-to-sleep-programmatically – Andrey Voitenkov Feb 15 '13 at 07:37
1 Answers
0
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "My Tag");
wl.acquire();
//..screen will stay on during this section..
wl.release();
Don't forget the permission and please google it the next time .... http://developer.android.com/reference/android/os/PowerManager.html

Dominic
- 3,353
- 36
- 47