Question

I already know where to begin, at least by WakeLock class, but I can only call methods on and off the screen ... I do not know the simplest way to terminate a while for the screen to begin start off .. (brightness decreases slightly before turning off completely).

Thank you! I hope I have expressed myself right.

Était-ce utile?

La solution

Got it!

I used the SCREEN_OF_TIMEOUT method for the system class. Here is the code:

android.provider.Settings.System.putInt(getContentResolver(),
            Settings.System.SCREEN_OFF_TIMEOUT, 60000);

The number 60000 refers the time to the screen timeout (in ms). Thanks!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top