Java tutorial
//package com.java2s; import android.content.ComponentName; import android.content.Intent; public class Main { public static final String ACTION = "com.adamrocker.android.simeji.ACTION_INTERCEPT"; public static final String CATEGORY = "com.adamrocker.android.simeji.REPLACE"; public static final String KEY = "replace_key"; /** * @return an {@code Intent} to launch the given {@code packageName, name} with {@code replaceKey}. */ public static Intent createMushroomLaunchingIntent(String packageName, String name, String replaceKey) { Intent intent = new Intent(ACTION); intent.setComponent(new ComponentName(packageName, name)); intent.addCategory(CATEGORY); intent.putExtra(KEY, replaceKey); return intent; } }