get Screen Dormant Time, Screen off timeout - Android android.app

Android examples for android.app:Screen

Description

get Screen Dormant Time, Screen off timeout

Demo Code

import android.content.Context;
import android.provider.Settings;

public class Main {

  public static int getScreenDormantTime(Context context) {
    return Settings.System.getInt(context.getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, 30000);
  }// w  w  w .j a va  2s . c  om

}

Related Tutorials