I asked a similar question to this earlier this week but I'm still not understanding how to get a list of all installed applications and then pick one to run.
I've tried:
Intent intent = new Intent(ACTION_MAIN);
intent.addCategory(CATEGORY_LAUNCHER);
and this only shows application that are preinstalled or can run the ACTION_MAIN Intent type.
I also know I can use PackageManager to get all the installed applications, but how do I use this to run a specific application?
Here's a cleaner way using the packageManager
More info here http://qtcstation.com/2011/02/how-to-launch-another-app-from-your-app/
Following is the code to get the list of activities/applications installed on Android :
You will get all the necessary data in the
ResolveInfo
to start a application. You can checkResolveInfo
javadoc here.You can Find the List of installed apps in Android Device by using below code, "packageInfo" Contains Installed Application Information in Device. we can retrive Intent for the application installed from the packageinfo object and by using startactivity(intent), can start application. it is up to you how you organize the UI either Listview or Gridview. so on click event based on position, you can retrive intent object and start activity intent.
I have another solution: