내 응용 프로그램의 경우 화면이 잠겨 있는지 확인해야합니다. 이것을 확인하는 방법은 문제가 있습니다.화면이 잠겨있는 것을 확인하는 방법
if(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON != 0){
// some code
}else if((WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED)!= 0){
// some code
}
그러나이 경우 다른 부분 ... 난 화면이 고정되지 않았거나 확인하기 위해 사용해야 할 플래그 모두 항상 실행 : 나는 다음과 같은 플래그를 사용
다음 링크 참조 [ 15,[http://stackoverflow.com/questions/8317331/detecting-when-screen-is-locked][2] [http://stackoverflow.com/questions/3446202/android-detect- [3] [1] : http : // stackoverflow.COM/질문/3170563/안드로이드 감지 전화 잠금 이벤트 [2] : http://stackoverflow.com/questions/8317331/detecting-when-screen-is-locked [3] : HTTP : //stackoverflow.com/questions/3446202/android-detect-phone-unlock-event-not-screen-on – Shruti
if 및 else를 모두 실행하는 방법은 무엇입니까? –
http://stackoverflow.com/questions/8968265/android-auto-logout-when-app-goes-to-background/8968763#8968763 –