Wednesday 29 May 2013

Keep the screen to stay on(with out going to sleep mode) when i taking pictures from camera automatically with out userinterface.


Using PowerMAnager in Android we can keep the screen to stay on(with out going to sleep mode) when i taking pictures from camera automatically  with out userinterface.

PowerManager.WakeLock w1;
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
w1 = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
w1.acquire();
w1.release();

No comments:

Post a Comment