Example usage for android.view View SCREEN_STATE_ON

List of usage examples for android.view View SCREEN_STATE_ON

Introduction

In this page you can find the example usage for android.view View SCREEN_STATE_ON.

Prototype

int SCREEN_STATE_ON

To view the source code for android.view View SCREEN_STATE_ON.

Click Source Link

Document

Indicates that the screen has changed state and is now on.

Usage

From source file:com.mukesh.OtpView.java

@Override
public void onScreenStateChanged(int screenState) {
    super.onScreenStateChanged(screenState);
    if (screenState == View.SCREEN_STATE_ON) {
        resumeBlink();/*from   ww w.  j av  a  2 s.  co m*/
    } else if (screenState == View.SCREEN_STATE_OFF) {
        suspendBlink();
    }
}