正如我在文档中读到的
在Android N中,为了在设备锁定时接收启动完成的操作,我们应该使用Direct Boot 中的android:directBootAware和android:encryptionAware属性。如下所示:
<receiver
android:name=".receivers.BootCompletedReceiver"
android:directBootAware="true"
android:encryptionAware="true"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
</intent-filter>
</receiver>不幸的是,android:encryptionAware被标记为未知属性。
发布于 2018-09-26 17:20:37
这看起来文档在英语和俄语版本之间不匹配。您提供的链接用于俄语翻译,仅显示android:encryptionAware的用法。但是,英文版只显示了android:directBootAware的用法。尝试仅使用android:directBootAware。
https://stackoverflow.com/questions/52511578
复制相似问题