0

**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

1 Answers1

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