14

How can we turn automatic brightness off in android?

shripal
  • 1,222
  • 4
  • 19
  • 40

1 Answers1

23
Settings.System.putInt(getContentResolver(), 
    Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
Atiq
  • 14,435
  • 6
  • 54
  • 69
Dusty
  • 2,283
  • 2
  • 20
  • 24
  • 4
    thanx Dusty to get idea i have done like this Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL); and got right result – shripal Oct 30 '10 at 06:13
  • No problem. You may want to accept the answer so anyone running across it will know it's been answered and not have click to see. Welcome to SO. – Dusty Oct 30 '10 at 13:53
  • Which package should be imported for this `Settings` and `SCREEN_BRIGHTNESS_MODE`? – Deqing Jan 06 '14 at 07:58
  • @Deqing, Settings is a default android library. Check here: http://developer.android.com/reference/android/provider/Settings.System.html – yuralife Jan 29 '14 at 12:02