get Screen Brightness - Android User Interface

Android examples for User Interface:Screen Brightness

Description

get Screen Brightness

Demo Code


//package com.java2s;

import android.content.Context;

import android.provider.Settings;

public class Main {

    public static int getScreenBrightness(Context context) {
        return Settings.System.getInt(context.getContentResolver(),
                Settings.System.SCREEN_BRIGHTNESS, 255);
    }//from   w w w. ja  v  a2 s .c  om
}

Related Tutorials