Java 广播接收机isn';t接收动作\u屏幕\u关闭意图

Java 广播接收机isn';t接收动作\u屏幕\u关闭意图,java,android,android-intent,broadcastreceiver,Java,Android,Android Intent,Broadcastreceiver,我已经创建了一个BroadcastReceiver,可以监听“动作屏幕关闭”的意图 我已在舱单上登记: <receiver android:name=".path.to.ExampleReceiver"> <intent-filter> <action android:name="android.intent.action.ACTION_SCREEN_OFF"></action> </intent-filter

我已经创建了一个
BroadcastReceiver
,可以监听“动作屏幕关闭”的意图

我已在舱单上登记:

<receiver android:name=".path.to.ExampleReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_SCREEN_OFF"></action>
    </intent-filter>
</receiver>


但是当屏幕关闭时,不会调用
onReceive()
方法。我还需要做什么才能获得此功能?

操作屏幕关闭
不会发送给清单中注册的接收者。它仅从运行的组件发送到通过注册器registerReceiver()注册的接收器。

谢谢。您知道我可以在哪里找到哪些操作可以发送给清单中注册的接收者吗?@crm:大多数都可以。可以做什么和不能做什么的名册没有记录<代码>动作屏幕打开,
动作屏幕关闭
,和
动作电池更换
是我脑海中能想到的三大功能,它们只能发送给通过
注册器Receiver()注册的接收者。
<receiver android:name=".path.to.ExampleReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_SCREEN_OFF"></action>
    </intent-filter>
</receiver>