Android launch applications detail page

GFlam picture GFlam · Jun 4, 2011 · Viewed 12k times · Source

I'm working on an application where I list the installed applications with the package manager. I can get the package name of the item clicked, but I'd like to then launch the details screen based on the package. So for instance if Dolphin Browser were selected in the list, you would then see the following image. How can I do this?

enter image description here

Final solution set your target as Gingerbread API level 9 and set your min as API level 7

final int apiLevel = Build.VERSION.SDK_INT;
Intent intent = new Intent();
if (apiLevel >= 9) {
    //TODO get working on gb
    //Toast.makeText(SDMove.this, "Gingerbread Not Currently Supported", Toast.LENGTH_LONG).show();
    startActivity(new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
                             Uri.parse("package:" + pli.pkg.packageName)));
} else {
    final String appPkgName = (apiLevel == 8 ? "pkg" : "com.android.settings.ApplicationPkgName");
    intent.setAction(Intent.ACTION_VIEW);
    intent.setClassName("com.android.settings", "com.android.settings.InstalledAppDetails");
    intent.putExtra(appPkgName, pli.pkg.packageName);
    startActivity(intent);
}

Answer

khellang picture khellang · Jun 4, 2011

Try this:

startActivity(new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:your.package.here")));

And replace "package:your.package.here" with the real package you want to view...