On Wed, May 30, 2012 at 6:33 AM, kelum prasad <[email protected]> wrote:
> I tried with wake locks in Power Management API  to turn on and turn
> off the screen.

You don't turn off the screen. Android turns off the screen, based on
the user's preferred screen timeout interval.

> Is there any reason not to turn off the screen with
> PARTIAL_WAKE_LOCK ?

It does not work.

> I tried with the property
> "android.provider.Settings.System.SCREEN_OFF_TIMEOUT" to turn off the
> screen.

Please leave the user's settings alone, unless the user is expressly
expecting you to mess with their settings.

> Can anyone please help me to find a solution for this.

Leave the screen alone, and it will turn off when the user decided
that it should turn off.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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