If you click on your desktop for a long time and choose to add an application shortcut, you will be greeted with a list that will show all your applications for installation. I needed the same functionality in my application, so I copied the intent from the launch source:
Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
Intent pickIntent = new Intent(Intent.ACTION_PICK_ACTIVITY);
pickIntent.putExtra(Intent.EXTRA_INTENT, mainIntent);
this.startActivityForResult(pickIntent, MoreIconsConstants.REQUEST_PICK_APPLICATION)
When this is done in the launcher, it is pretty fast. When I do this in my activity, it takes maybe 15 seconds instead of 3. It seems that the launcher should cache this data for some time? Is there a way to cache data?
Thank!
pcm2a source
share