Java tutorial
//package com.java2s; import android.content.Context; import android.provider.Settings; public class Main { public static void setScreenMode(int paramInt, Context mContext) { try { Settings.System.putInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, paramInt); } catch (Exception e) { e.printStackTrace(); } } }