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