

Then in the activity that receives the intent, you create an intent for your shortcut and return it as the activity result. The correct way is to listen for a shortcut request from the home screen- with an intent filter like so in your manifest: As "someone" told you, this may not work on all phones, and may break in future Android releases. The example code uses undocumented interfaces (permission and intent) to install a shortcut. What means internal implementation? Is that code trustable or not.help me pls. It may not work in future versions of Android, as Google is not obligated to maintain internal undocumented interfaces.

It may not work on all past versions of Android.

It will not work on all home screen implementations. This is an internal implementation, not part of the Android SDK. They seem to be the answer to my question but someone told me that this code is not gonna work on all devices and that is deprecated and that what i want to do is not possible. And i want to pass to the activity some extra arguments (As strings for example).Īre those things possible? I found some link and some similar questions like Android: Is there a programming way to create a web shortcut on home screen The shortcut open an html page that has been previously downloaded, so I want it to use the default browser but I don't want to use internet cause I already have the page.Ģ)The second button create another shortcut that starts an activity. If I click the first one a shortcut is created in my home screen. 1) I'm inside an activity, there are 2 buttons.
