Android Service Listener for the wakelock screen

前端 未结 3 2100
予麋鹿
予麋鹿 2020-12-12 07:53

Hii all,

Im developing an emergency calling application. What i want is when some person uses this specific code the phone will unlock and then only my application w

3条回答
  •  臣服心动
    2020-12-12 08:39

    You can create a BroadcastReceiver and register it with your application to listen for Intent.ACTION_SCREEN_OFF, Intent.ACTION_SCREEN_ON, and Intent.ACTION_USER_PRESENT. Between SCREEN_OFF and USER_PRESENT, the phone is locked.

提交回复
热议问题