未在所有设备上收到 BOOT

编程入门 行业动态 更新时间:2024-10-25 04:17:12
本文介绍了未在所有设备上收到 BOOT_COMPLETED 意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建了一个应用程序,它使用以下过滤器在接收器中接收 BOOT_COMPLETED:

I have created an application that receives BOOT_COMPLETED within a receiver using the following filter:

<intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" />

我在一台设备上收到了这个,但我有另一台设备虽然使用了相同的 APK,但没有收到这个.哪些特定于设备的问题会阻止特定设备接收此意图?有没有办法对此进行测试并创建补救措施?

I receive this on one device but I have another device that does not receive this despite using the same APK. What device-specific issues could prevent a particular device from receiving this intent? Is there any way to test for this and create a remedy?

推荐答案

Android 3.1 之后的某些设备在 BOOT_COMPLETED 接收器后不会给予应用控制权.

Some devices after Android 3.1 will not give the app control after the BOOT_COMPLETED receiver.

谷歌早就说过,用户应该首先从启动器启动一个活动,在那个应用程序可以做很多事情之前.防止 BOOT_COMPLETED 被在第一个活动启动之前交付是相同的逻辑扩展争论.

Google has long said that users should launch an activity from the launcher first, before that application can go do much. Preventing BOOT_COMPLETED from being delivered until the first activity is launched is a logical extension of the same argument.

我不知道它对哪些设备有影响.

I do not know which devices it makes a difference on though.

更多推荐

未在所有设备上收到 BOOT

本文发布于:2023-11-27 10:29:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637702.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:设备   BOOT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!