private void installShortcut() { String ACTION_INSTALL_SHORTCUT = "com.android.launcher.action.INSTALL_SHORTCUT"; String EXTRA_SHORTCUT_DUPLICATE = "duplicate"; Intent actionMainIntent = new Intent(Intent.ACTION_MAIN); actionMainIntent.addCategory(Intent.CATEGORY_LAUNCHER); actionMainIntent.setComponent(new ComponentName(this.getPackageName(), ".PhoneInputActivity")); Intent installShortcutIntent = new Intent(ACTION_INSTALL_SHORTCUT); installShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name)); installShortcutIntent.putExtra(EXTRA_SHORTCUT_DUPLICATE, false); installShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, actionMainIntent); installShortcutIntent.putExtra( Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(this, R.drawable.icon) ); sendBroadcast(installShortcutIntent); }