Have you looked at the Launcher source code for the various platform releases (source.android.com) ?
On Tuesday, July 3, 2012 4:50:45 PM UTC+1, Bryan Ashby wrote: > > Part of my applications duties are to enumerate "launcher" activities -- > to do this, I call PackageManger.queryIntentActivities(). On some devices > this has resulted in a *TransactionTooLargeException*. Is there a way > around this? > > *Example code:* > >> final PackageManager pm = getPackageManager(); >> Intent intent = new Intent(Intent.ACTION_MAIN, null); >> intent.addCategory(Intent.CATEGORY_LAUNCHER); >> final List<ResolveInfo> ri = pm.queryIntentActivities(intent, 0); >> // TransactionTooLargeException > > > I saw a related post about > getInstalledPackages()<https://groups.google.com/forum/?fromgroups#!topic/android-developers/EK4eJPadabs>but > it seemed to end with "Don't do that" which seems like an odd answer to > "just using the API". I'd expect that in this case if the underlying > implementation is limited to 1M that the query is done in batches and > hidden from the developer or that an API exists to do it in batches myself. > > Any ideas? This works nearly all of the time (expected!) but it seems that > every now and then I'm running into this exception in the wild on customer > devices. > -- 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