Use this sample code in your activity which is set as a LAUNCHER and MAIN in AndroidManifest.xml
private void createShortcut(){
Intent shortcutIntent = new Intent(getApplicationContext(),MainActivity.class);
shortcutIntent.setAction(Intent.ACTION_MAIN);
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "ShortcutDemo");
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,Intent.ShortcutIconResource.fromContext(getApplicationContext(), R.drawable.ic_launcher));
intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
getApplicationContext().sendBroadcast(intent);
}
Also apply following permissions in your AndroidManifest.xml
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
Hope this will work for you