Calling hidden API in android to turn screen off
<p>I'm thinking about using a hidden api to turn the screen off in my app. setScreenState from <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/os/Power.java" rel="nofollow">http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/os/Power.java</a> does what I want, but its a hidden API. Does that mean I shouldn't use it? I would think its a fairly stable api.
Currently, I'm setting the screen timeout to 1 millisecond, and then resetting the timeout once the screen turns off. However, android ignores the 1 millisecond and instead it takes about 3 seconds to turn off and sometimes it ignores it completely and doesn't turn off.
Any suggestions?</p>
