Android 在桌面创建一个快捷方式代码如下:?卸载快捷方式:ComponentName comp new ComponentName(this.ge
Android 在桌面创建一个快捷方式
代码如下:
?卸载快捷方式:
ComponentName comp = new ComponentName(this.getPackageName(), appClass);shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(action).setComponent(comp));
sendBroadcast(shortcut);
}?需要权限:<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />?
