Tuesday, May 31, 2011

Re: [android-developers] Re: App Widget considerations when enabling installLocation in manifest

On Tuesday, May 31, 2011 10:08:19 AM UTC+1, Mark Carter wrote:

What is the best way to check the app has been moved to SD?


Get an instance of the ApplicationInfo object with code like this:

PackageManager pkgMgr = context.getPackageManager();
ApplicationInfo appInfo = pkgMgr.getApplicationInfo("your.package.name", 0);

It'd be nice to put code like this in the appwidget itself, so that if the user has one on their home screen, you could notify them more proactively. But annoyingly, the appwidget doesn't get notified that it's going away; no ACTION_APPWIDGET_DISABLED, no ACTION_APPWIDGET_DELETED, nothing. It just disappears... but any service you might have scheduled to update said appwidget doesn't get removed, it's left to run with no widget to update.

String

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment