0
嗨,我正在创建应用程序快捷方式到我的应用程序。我的应用程序快捷方式位于主屏幕的前端。当时我关闭应用程序时如何关闭/删除应用程序快捷方式。我需要源代码。请任何人帮助我。谢谢。如何在android中关闭应用程序快捷方式?
代码在这里。帮我。
Intent shortcutintent = new Intent("com.android.launcher.action.INSTALL_SHORTCUT");
shortcutintent.putExtra("duplicate", false);
shortcutintent.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));
Parcelable icon = Intent.ShortcutIconResource.fromContext(
getApplicationContext(), R.drawable.icon);
shortcutintent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon);
shortcutintent.putExtra(Intent.EXTRA_SHORTCUT_INTENT,
new Intent(getApplicationContext() , FirstScreenActivity.class));
sendBroadcast(shortcutintent);
谢谢。但是图标显示在主屏幕上。 – Balamurugan