Basically, I want to get a list of all installed apps and pick one to run from an activity.
I've tried ACTION_PICK with Intents but that seems to leave out apps that were downloaded and it has a bunch of junk in it.
Thanks
Basically, I want to get a list of all installed apps and pick one to run from an activity.
I've tried ACTION_PICK with Intents but that seems to leave out apps that were downloaded and it has a bunch of junk in it.
Thanks
// to get the list of apps you can launch
Intent intent = new Intent(ACTION_MAIN);
intent.addCategory(CATEGORY_LAUNCHER);
List<ResolveInfo> infos = getPackageManager().queryIntentActivities(intent, 0);
// resolveInfo.activityInfo.packageName = packageName
// resolveInfo.activityInfo.name = className
// reusing that intent
intent.setClassName(packageName, className);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
startActivity(intent)
Hope that's enough to help you figure out.