开发者

UI crashes after change from Charge Only to Disk Drive?

It seems that apps, or maybe it's just my app, that have the following required permissions:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

tend to occasionally crash the UI when for example you're running the app and then you decide to switch from Charge Only to Disk Drive. The other thing is that the app becomes unavailable to the user when the user is 开发者_StackOverflowon Disk Drive mode. You get the message : "The Linked program is no longer installed on your phone".

Is there a way to mitigate this issue, programmatically. Maybe, by checking when the user is on Disk Drive mode which should trigger the removal of the permissions or something similar. Is this possible?


Are you using a cursor adapter/content provider combination? You should be able to get broadcasts when the external storage is unmounted/mounted, and you could write some fall-back code. Are you installing your app on SDCARD?

http://android-developers.blogspot.com/2010/07/apps-on-sd-card-details.html

android intent for sdcard ready

See if these links help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜