Get Screen Lightness - Android Phone

Android examples for Phone:Screen

Description

Get Screen Lightness

Demo Code


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

import android.provider.Settings.System;

public class Main {

    public static int GetLightness(Activity act) {
        return System.getInt(act.getContentResolver(),
                System.SCREEN_BRIGHTNESS, -1);
    }//ww w .ja va  2  s .co  m
}

Related Tutorials