On Sat, Aug 6, 2011 at 1:46 AM, John <android...@gmail.com> wrote: > In the case of the Gallery application i.e. > "com.google.android.gallery3d", which throws the "Application is not > installed" error in the shortcut, it shows up both in > getInstalledPackages and also in queryIntentActivities with the given > Intent, also it only has one entry in the queryIntentActivities which > confuses me even more. If it had more than one entry, that would make > sense to me, I would need to specify which className to invoke.
com.google.android.gallery3d doesn't exist in the Android open source project (at least Google Code Search doesn't turn it up), and the Gallery3D project doesn't use that package. Have you tried creating a shortcut based on the actual ResolveInfo object? Here's the code snippet for creating such an Intent: Intent buildLauncherIntent(ResolveInfo launchable) { ActivityInfo activity=launchable.activityInfo; ComponentName name=new ComponentName(activity.applicationInfo.packageName, activity.name); Intent i=new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); i.setComponent(name); return(i); } -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.5 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en