get Screen Brightness - Android Phone

Android examples for Phone:Screen

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 www .  j av a2s  .  c  om*/
}

Related Tutorials