I am developing a Launcher application. I have noticed that camera and gallery have same package name, also Google+ and Photos have same package name. When I try to start camera/gallery it opens the gallery and when I try to start Photos/Google+, I opens Google+.
I am using this code to get list of apps.
Intent i = new Intent(Intent.ACTION_MAIN, null);
i.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> availableActivities = manager.queryIntentActivities(i, 0);
As for Camera, I know that I can use an Intent to start camera when app name is Camera and package name is that of gallery, but there could be many apps with same thing. Is there any generalized solution for all of the apps?
P.S.: This is how I am getting app info
for(ResolveInfo ri : availableActivities) {
AppItem app = new AppItem();
app.setLabel(ri.loadLabel(manager));
app.setName(ri.activityInfo.packageName);
quick_apps.add(app);
}