start Activity Auto Brightness - Android Activity

Android examples for Activity:Activity Background

Description

start Activity Auto Brightness

Demo Code


//package com.java2s;
import android.app.Activity;

import android.provider.Settings;

public class Main {

    public static void startAutoBrightness(Activity activity) {
        Settings.System.putInt(activity.getContentResolver(),
                Settings.System.SCREEN_BRIGHTNESS_MODE,
                Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
    }//from w w  w .j  a  v a2 s. com
}

Related Tutorials