Hi there, I am writing a launcher in Android and here is the problem I have been trying to fix for a while with no luck.
I have below code to query all activities running at very beginning of my launcher, say onResume(). final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List<ResolveInfo> infos = packageManager.queryIntentActivities(mainIntent, 0); for (final ResolveInfo info : infos) { // create my own record for each activity } The problem is that if I set my launcher as default and reboot the device, every time I can get only part of the full list by above code. It seems some big fat activities (such as Wind-up knight) are always missing. However running above code second time will return the full list. Does any one have idea why? My guess is that PackageManager needs some time to parse the fat activities and if queryIntentActivities() is called too early, it just returns a partial list, is that true? But why the default launcher has no such issue at all? Thanks for any help in advance! -- 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