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...
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.
In addition to Jonathan,
Each app can do shortcuts. Each shortcut specified in app's manifest. So you can get shortcuts list (this method in activity):
Kotlin
It will print something like:
I'm trying to do the same and there a lot of things not clear about this topic, at least not clear to me...........An example is Openapp market that create shortcuts everytime you "download" an app, but the shortcuts it is actually only a link to an html page. Anyway i have 2 android phones and in the firstone is working in the second one is not creating any shortcuts.......
in may app i do the following:
But someone told me that the is wrong but i didn't find anyother way to create shortcuts....