get Screen Off Timeout - Android User Interface

Android examples for User Interface:Screen Dormant

Description

get Screen Off Timeout

Demo Code


//package com.java2s;

import android.content.Context;

import android.provider.Settings;

public class Main {
    public static int getScreenOffTimeout(Context context) {
        return Settings.System.getInt(context.getContentResolver(),
                Settings.System.SCREEN_OFF_TIMEOUT, 0);
    }/*from w  w  w. j av  a2  s .  c  o  m*/
}

Related Tutorials