In my application i want to turn on /off the hardware key back light(Home, Menu, Back) programatically.I searched many more but they will work on rooted device but i want for all whether its rooted or not.Can any one tell me that how can i do that.
Asked
Active
Viewed 887 times
0
-
possible duplicate of [Android - turn off hardware key lights](http://stackoverflow.com/questions/4152053/android-turn-off-hardware-key-lights) – Morrison Chang Apr 14 '15 at 05:41
-
Yes, that will work on rooted devices but i want for all Whether it is rooted or not – Android dev Apr 14 '15 at 05:53
1 Answers
-1
I got the below answer that is working perfactly
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK ,
"My wakelook");
wakeLock.acquire();
to release wakelock used below code
wakeLock.release();

Android dev
- 273
- 2
- 5
- 23