I have seen ways to make shortcuts, but I need to find a way to get a list of shortcuts installed on the phone.
I want my user to be able to select one of his/her shortcuts and launch it from my application. Is there a way to do this (an API) or will I need a reflection method to call a system service?
Here is how it is done in the Launcher...
Intent shortcutsIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT);
List<ResolveInfo> shortcuts = getPackageManager().queryIntentActivities(shortcutsIntent, 0);
The shortcuts are private to Launcher. There is no API, and anything you try to do will be very fragile as different launcher implementations (and versions) will have different storage structures.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With