Android 如何在桌面上制作应用程序的图标?WebView的问题

Android 如何在桌面上制作应用程序的图标?WebView的问题,android,Android,在我的应用程序中,我有一个带有WebView的活动 当我按下主页按钮,然后点击我的应用程序图标——网页不重新加载——这很好。 但在代码中,我手动创建图标: private void createIcon(int iconId){ final Intent shortcutIntent = new Intent(Intent.ACTION_MAIN); ComponentName name = new ComponentName(getPackageName(),

在我的应用程序中,我有一个带有WebView的活动

当我按下主页按钮,然后点击我的应用程序图标——网页不重新加载——这很好。 但在代码中,我手动创建图标:

private void createIcon(int iconId){
        final Intent shortcutIntent = new Intent(Intent.ACTION_MAIN);
        ComponentName name = new ComponentName(getPackageName(), ".FullScreenBrowserActivity");
        shortcutIntent.setComponent(name);
        shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

        Intent addIntent = new Intent();
        addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
        addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Fulscreen Browser");
        addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(this, iconId));

        addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
        this.sendBroadcast(addIntent);
    }
当我点击这个图标时,应用程序会启动自己的新副本,网页也会开始加载

如何在桌面手册上创建新图标(安装后)以及在WebView中单击图标-网页时不重新加载

谢谢