디바이스의 스크린이 켜졌는지 확인하는 방법은 아래와 같다.

// check screen status
public static boolean isScreenOn(Context context) {
     PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
     return pm.isScreenOn();
}
저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by HLDEC
TAG