Java tutorial
//package com.java2s; import android.content.Context; import android.provider.Settings; public class Main { public static int getScreenMode(Context mContext) { int screenMode = 0; try { screenMode = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE); } catch (Exception localException) { } return screenMode; } }