How to add shortcut to Home screen in android programmatically [duplicate]
Android provide us an intent class com.android.launcher.action.INSTALL_SHORTCUT which can be used to add shortcuts to home screen. In following code snippet we create a shortcut of activity MainActivity with the name HelloWorldShortcut. First we need to add permission INSTALL_SHORTCUT to android manifest xml. <uses-permission android:name=”com.android.launcher.permission.INSTALL_SHORTCUT” /> The addShortcut() method creates a new shortcut on Home … Read more