سؤال

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.

هل كانت مفيدة؟

المحلول

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!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top