Android examples for Intent:Short cut
create Short Cut via Intent
import android.R; import android.content.Context; import android.content.Intent; import android.os.Parcelable; public class Main { public static void createShortCut(Context context, String action) { Intent shortcut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT"); shortcut.putExtra("duplicate", false); shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, "QK-LINX"); Parcelable icon = Intent.ShortcutIconResource.fromContext(context, R.drawable.ic_launcher);//from w ww . j a v a 2 s . c om shortcut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon); Intent intent = new Intent(); intent.setAction(action); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, intent); context.sendBroadcast(shortcut); } }