In Android Souccr code, I find a Power class packaged in android.os.
This class is not provided in SDK,But this is really a public class.
This class has five native method:
public static native void shutdown()
public static native void reboot(String reason) throws IOException
public static native int setLastUserActivityTimeOut(long ms)
public static native int setScreenState(boolean on)
public static native int setLightBrightness(int mask,int brightness)

You can try the fourth method.


On Jul 18, 9:43 pm, Yuri Dario <mc6...@mclink.it> wrote:
> Hi,
>
> I'm looking for a way to power off the device screen from my program.
> I see that PowerManager is only for system apps, and I can't find
> other ways.
>
> Can you help me?
>
> thanks,
>
> Yuri
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to