get Screen Brightness Mode State - Android User Interface

Android examples for User Interface:Screen Brightness

Description

get Screen Brightness Mode State

Demo Code


//package com.java2s;

import android.content.Context;

import android.provider.Settings;

public class Main {

    public static int getScreenBrightnessModeState(Context context) {
        return Settings.System.getInt(context.getContentResolver(),
                Settings.System.SCREEN_BRIGHTNESS_MODE,
                Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
    }//from   ww  w. j a va  2 s.  c o m
}

Related Tutorials