Those apps are probably on external storage, which has not been mounted yet. You need to look at the broadcasts to find out when it is available.
On Thu, May 10, 2012 at 4:02 PM, Farmer <[email protected]> wrote: > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

