Hi All ,
             I am trying to do the screen back light on and off
through program but i am unable to do the screen baclight off through
program .

my code is as follows

static PowerManager pm=null;
static PowerManager.WakeLock wl=null;

//for light on
if(pm == null)
{

    pm = (PowerManager)
context.getSystemService(context.POWER_SERVICE);
    wl = pm.newWakeLock(PowerManager.ACQUIRE_CAUSES_WAKEUP|
PowerManager.FULL_WAKE_LOCK, "MyTag");
      wl.acquire();//duration);
}

//for light off
if(wl != null && wl.isHeld ( ))
{
        wl.release();
         wl      =       null;
}

with the above code i am able to do light on but light off is not
happening.

can anyone throgh some light about what i should do for doing the
light off of the screen programetically.

Regards

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to