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?
I had a requirement to filter out the system apps which user do not really use(eg. "com.qualcomm.service", "update services", etc). Ultimately I added another condition to filter down the app list. I just checked whether the app has 'launcher intent'.
So, the resultant code looks like...
Clean solution that filter successfuly out system apps
The idea behind this solution is that the main activity of every system app does not have a custom activity icon. This method gives me an excellent result:
Another way to filter on system apps (works with the example above):
Getting list of installed non-system apps
Get All the apps:
Check if installed app then open: