19 June, 2010

Launching the Android Application Manager

I recently had a need in an Android app to launch the Application Manager. After poking through the source, it turned out to be pretty easy. As you would expect, you simply create an intent and start the activity.

Here is the code to do it:

private static final String ANDROID_SETTINGS_PKG = "com.android.settings";
private static final String ANDROID_SETTINGS_INSTALLED_APP_DTL = ANDROID_SETTINGS_PKG + ".InstalledAppDetails";
private static final String ANDROID_SETTINGS_APP_PKG_NAME = ANDROID_SETTINGS_PKG + ".ApplicationPkgName";


Intent intent = new Intent();
intent.putExtra(ANDROID_SETTINGS_APP_PKG_NAME, "com.your.package");


This will launch the Application manager for the "com.your.package" app (as defined in its AndroidManifest.xml).

No comments:

Post a Comment