I am trying to add a button to my application. When clicked I would like to launch a selection dialog that shows all shortcuts or installed applications. Choosing one should permanently set the button to launch that application.
I understand how to use packagemanager to get a list of installed applications:
PackageManager pm = getPackageManager(); List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA); but do I really need to take this and use a ListAdapter and create a seperate dialog from scratch?
I feel like I've seen this selection menu in other apps multiple times (such as any launcher app when you go to add a shortcut, or in Google's Car Home app when you add a new shortcut). Is there no stock way to use this shortcut selection menu?
I've searched these forums all over and can't find otherwise. Any help will be much appreciated. Thank you.