Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Activity; import android.provider.Settings; public class Main { public static boolean isAutoBrightness(Activity activity) { boolean isAuto = false; try { isAuto = Settings.System.getInt(activity.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE) == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC; } catch (Settings.SettingNotFoundException e) { e.printStackTrace(); } return isAuto; } }