Android -- ShortCut
添加 添加快捷方式是向桌面应用(launcher)发送相关action的广播: public static final String ACTION_ADD_SHORTCUT = "com.android.launcher.action.INSTALL_SHORTCUT"; Code: private void addShortcut(String name) { Intent addShortcutIntent = new Intent(ACTION_ADD_SHORTCUT); // 不允许重复创建 addShortcutIntent.putExtra("duplicate", false);// 经测试不是根据快捷方式的名字判断重复的 // 名字 addShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name); // 图标 addShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContex...
