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