What I want to do is:
1) I\'m inside an activity, there are 2 buttons. If I click the first one a shortcut is created in my home screen. The shortcut open an
Since API level 26, using com.android.launcher.action.INSTALL_SHORTCUT is deprecated. The new way of creating shortcuts are using ShortcutManager.
API level 26
com.android.launcher.action.INSTALL_SHORTCUT
It mentions that there are 3 kinds of shortcuts, static, dynamic and pinned. Based on your requirements, you can choose to create them.