0

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.

Artur Couto
  • 498
  • 1
  • 6
  • 19
  • 1
    You can try with `System` class, I believe there's a value to set the current birghtness. Maybe with a count down timer. – Rotary Heart Jan 31 '13 at 19:00
  • I serached into the docs (http://developer.android.com/reference/java/lang/System.html) but could not find anything about brightness setting or something on the screen – Artur Couto Jan 31 '13 at 19:08
  • 1
    ther's an api to retrieve the screen timeout http://developer.android.com/reference/android/provider/Settings.System.html#SCREEN_OFF_TIMEOUT but android don't let you know the 'Dimming' timeout – StarsSky Jan 31 '13 at 19:47

1 Answers1

1

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!

Artur Couto
  • 498
  • 1
  • 6
  • 19