当应用程序安装在SD卡上广播接收器不工作 [英] BroadcastReceiver not working when app is installed on sd card

查看:280
本文介绍了当应用程序安装在SD卡上广播接收器不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个应用程序EventsManager中,我有执行用于BOOT_COMPLETED broadcast.this接收器已被用于重新注册所有AlarmManager.If应用程序安装在手机内存中的事件BroadcastReciver的它工作正常,但在SD卡BOOT_COMPLETED广播的情况下,不被传递到广播接收器。
请帮助..

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. pls help..

推荐答案

文档

为了您的应用程序始终像预期的那样,你不应该允许的,如果它使用以下任一功能的外置存储安装了应用程序...安装在外部存储前,该系统提供了ACTION_BOOT_COMPLETED广播到设备。如果您的应用程序安装在外部存储,它永远不能接受这个广播。

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. 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.

这篇关于当应用程序安装在SD卡上广播接收器不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆