On Jan 5, 9:49 pm, TreKing <[email protected]> wrote: > On Wed, Jan 4, 2012 at 8:06 PM, galapogos <[email protected]> wrote: > > 1. getInstalledPackages seem to take quite a bit of time to detect and > > display all apps(about 8-10s for 200+ apps). Is it possible to make > > this faster? Titanium Backup seems to list all apps instantaneously > > when I tap the "Backup/Restore" tab. Android system's own "Manage > > Applications" also seems to be much quicker at displaying the apps. > > Caching.
How do I cache? I did some investigation, and the steps that seem to take a lot of time is displaying of the app name/icon and whether it's a system app or not, i.e. getting the following results: 1. applicationInfo.loadLabel().toString() 2. applicationInfo.flags 3. applicationInfo.loadIcon() How do I cache when it's the first time that I'm running the app and it's generating a new list? > > > 2. Like "Manage Applications", I would like to have a way to cull the > > list so that I can in various tabs I can display apps based on their > > properties, e.g. system vs user app, launchable vs non-launchable, > > etc. I know how to do this via the applicationInfo.flags, but how do I > > do this without running getInstalledPackages in the tab activity and > > incurring the detection phase all over again? How can I pass the List > > from 1 tab to another? > > The Tabs should be part of the same Activity, which would have one list > they both access. I see. Currently I have a main activity which extends a TabActivity class, and in it I have a few tabs, which extends ListActivity classes. So I should generate the app list in the TabActivity's onCreate() method, and access the list from the tabs? Thanks again. -- 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

