Android - BroadcastReceiver 尝试在无序广播期间返回结果

标签 android bootcompleted

我正在尝试捕捉 BOOT_COMPLETED Intent 。在我的接收器中,我只是将一些内容打印到日志中。在 Logcat 中,我收到此错误,并且我放置的日志语句永远不会打印出来。我已在 list 中设置了权限

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

并且还在我的接收器中声明了所需的 Intent 过滤器。我做错了什么?

最佳答案

What am I doing wrong?

鉴于您提供的信息有限,无法回答这个问题。也许你的 <intent-filter> 中的操作字符串是错误的.

Here is a sample project这正是您所描述的(启动时接收器向 LogCat 写入消息)。

关于Android - BroadcastReceiver 尝试在无序广播期间返回结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7324467/

相关文章:

android - 带有自定义下拉 View 的微调器不触发 onItemSelected()

java - android 恢复在 backstack 中的 fragment 的实例状态

java - Android模拟按键

android - Android 中的 java.lang.NullPointerException

android - Logcat : Not granting permission android. 权限.BIND_DEVICE_ADMIN 打包 com.myprojects.myapp (protectionLevel=2 flags=0xbe46)

android - 如何在 NestedScrollView 中显示滚动条

java - 从数据库获取数据与从 HashMap 获取数据

android - 如何创建即使在手机重启后也始终运行的通知?

android - 如何调试 BOOT_COMPLETED 广播接收器 "Force Close"崩溃?

android - 为什么基于 GPS 的安卓应用程序没有安装在基于辅助 GPS (A-GPS) 的安卓设备上?