gpt4 book ai didi

android - ACTION_BOOT_COMPLETED 是粘性广播吗?

转载 作者:搜寻专家 更新时间:2023-11-01 07:39:42 24 4
gpt4 key购买 nike

docs不要说任何一种方式,但我无法想象为什么你不会让它坚持下去。

当 SD 卡不存在时,我的应用程序进入暂停模式 - 但是,如果用户在系统完成启动之前启动我的应用程序,它会进入暂停模式。所以我希望它检测系统是否尚未完成启动并相应地等待几秒钟。

但如果您的应用程序必须已经运行才能听到 ACTION_BOOT_COMPLETED 广播,这就成为一个有争议的问题。

最佳答案

I can't imagine why you wouldn't let that stick.

也就是说,根据源代码,它不是粘性的。

however if the user launches my application before the system is done booting, it goes into pause mode

这怎么可能?

But it becomes a moot point if your application has to already be running to hear ACTION_BOOT_COMPLETED broadcasts.

不,它没有。事实上,获取ACTION_BOOT_COMPLETED 广播的唯一方法是通过 list 注册的BroadcastReceiver,特别是因为您不能假设您的任何代码将在广播时执行。

关于android - ACTION_BOOT_COMPLETED 是粘性广播吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5720584/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com