Java tutorial
//package com.java2s; //License from project: LGPL import android.content.ContentResolver; import android.net.Uri; import android.provider.Settings; public class Main { public static void saveBrightness(ContentResolver resolver, int brightness) { Uri uri = Settings.System.getUriFor("screen_brightness"); Settings.System.putInt(resolver, "screen_brightness", brightness); // resolver.registerContentObserver(uri, true, myContentObserver); resolver.notifyChange(uri, null); } }