Java tutorial
//package com.java2s; import android.content.ContentResolver; import android.content.Context; import android.provider.Settings; public class Main { public static int getBrightness(Context context) { ContentResolver cResolver = context.getContentResolver(); try { return Settings.System.getInt(cResolver, Settings.System.SCREEN_BRIGHTNESS); } catch (Settings.SettingNotFoundException e) { return 0; } } }