简体   繁体   English

在SD卡上安装了应用程序后,BroadcastReceiver无法正常工作

[英]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.

相关问题 SD卡上安装的应用未收到意向操作 - app installed on SD card not receiving intent action 从Play商店安装应用程序时,Android BroadcastReceiver无法正常工作 - Android BroadcastReceiver not working when app is installed from play store 在SD卡上安装APK会怎样? - What happens when an APK is installed on SD card? 重新安装SD卡后,重新启动SD卡上的App服务 - Restart Service for App on SD Card When SD Card Is Remounted 将应用程序安装在SD卡而非内部存储器上时,DownloadManager会广播DownloadManager.ERROR_FILE_ERROR - DownloadManager broadcasts DownloadManager.ERROR_FILE_ERROR when app is installed on SD card and not internal storage Android - 安装在SD卡上的应用程序时的内部存储与外部存储 - Android - Internal Storage vs External Storage when App installed on SD Card 使用安装到SD卡的应用程序接收系统广播的解决方法? - Workaround for receiving system broadcasts with app installed to SD card? 是否可以允许仅在Android 6的SD卡上安装应用程序? - Is it possible to allow an app to be installed on the SD card for Android 6 only? 有没有办法将要安装在SD卡上的视频文件保留在我的应用程序中? - Is there a way to keep video files within my app that will be installed on the sd card? 如果我的应用程序安装在SD卡上,私人数据也在那里吗? - If my app's installed on the SD card, is the private data there too?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM