private void createShortCut() {
Intent addShortCut =new Intent ();
addShortCut.setAction("android.intent.action.CREATE_SHORTCUT");
addShortCut.putExtra(Intent.EXTRA_SHORTCUT_NAME , "我的快捷方式");
Parcelable icon = ShortcutIconResource.fromContext(this, R.drawable.home_logo);
addShortCut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon);
addShortCut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, MainActivity.class);
setResult(RESULT_OK, addShortCut);
}
但是运行后,桌面干干净净,没有效果,求大神解脱!!!!!