[英]BroadcastReceiver not working when app is installed on sd card
I am creating a EventsManager app in which i have a BroadcastReciver which executes for BOOT_COMPLETED broadcast.this receiver has been used to re-register all the events with AlarmManager.If the app is installed on phone's memory the it works fine but in the case of sd card BOOT_COMPLETED broadcast is not being delivered to broadcast receiver. 我正在创建一个EventsManager应用程序,其中有一个我会执行BOOT_COMPLETED广播的BroadcastReciver。此接收器已用于向AlarmManager重新注册所有事件。如果该应用程序安装在手机的内存中,则可以正常使用SD卡BOOT_COMPLETED广播未传送到广播接收器。 pls help.. 请帮助。
Quoting the documentation : 引用文档 :
In order for your application to consistently behave as expected, you should not allow your application to be installed on the external storage if it uses any of the following features... The system delivers the ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device. 为了使您的应用程序始终如一地正常运行,如果使用以下任何功能,则不应允许您将应用程序安装在外部存储器上...在外部存储器安装到设备上之前,系统会传送ACTION_BOOT_COMPLETED广播。 If your application is installed on the external storage, it can never receive this broadcast. 如果您的应用程序安装在外部存储器上,则它将永远不会收到此广播。
Hence, you cannot allow your app to be installed to external storage. 因此,您不能允许将您的应用安装到外部存储。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.