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