Android examples for android.provider:Settings
get Brightness Mode
import android.content.Context; import android.provider.Settings; public class Main { static public int getBrightnessMode(Context context) { int brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL; try {//from w ww .j a v a 2s. co m brightnessMode = Settings.System.getInt(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE); } catch (Exception e) { e.printStackTrace(); } return brightnessMode; } }