Android;Force AppWidget to work from SD Card?

Is there any way to force AppWidget to work even App is moved to the SD Card and SD Card is not unmounted ? Docs say:

... you should not allow your application to be installed on the external storage if it uses any of the following features, due to the cited consequences when the external storage is unmounted :
...
App Widgets
Your App Widget will be removed from the home screen. When external storage is remounted, your App Widget will not be available for the user to select until the system resets the home application (usually not until a system reboot).

It seems that docs say AppWidget will be removed from home screen if user unmounts SD Card.But When I move the App in emulator to the SD Card (and I do not unmount SD Card) see problem loading widget message in Home Screen,also the widget is not available for user in list of widgets.Why?


For now, there is no way to make a Widget to work while the app is installed on the SD-Card. This is the normal behavior even when SD-Card is mounted.

You get the error problem loading widget because Widgets are automatically disabled (and removed from the Widget list, so you can't add them) when you move the app to external storage, but they are kept in Home Screen, to be ready when you move it back to the phone and home application is resetted.

If you're going to support that the user move your app to external storage, maybe you can publish another app to only hold your widgets, and configure it so that it can only by installed in the phone. This solves the problem but the user has to download two apps instead of one.

链接地址: http://www.djcxy.com/p/50584.html

上一篇: 我如何收听Intent.ACTION

下一篇: Android;强制AppWidget从SD卡上工作?