KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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? 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); }
Tags (comma-separated)
Save Edits
Cancel