我知道,在第三方开发的,可以在Google Play上玩的应用程序中,BroadcastReceiver直到用户输入应用程序后才开始运行。
我想知道在手机上预先安装的应用程序中会发生什么,因为我正在开发这种类型的应用程序。他们从头开始听,还是要求用户进入应用程序?
系统应用会接收广播,即使它们处于强制停止状态或尚未启动也不会
编辑:PackageManagerService有一个ActivityIntentResolver,它可以解析所有广播。因此,如果您检查isFilterStopped的替代项,则它将从已停止的程序包中排除系统应用程序。
以下是您可以在AOSP中搜索的注释:
// System apps are never considered stopped for purposes of
// filtering, because there may be no way for the user to
// actually re-launch them.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句