Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android从web加载快捷方式图标_Android_Android Intent - Fatal编程技术网

Android从web加载快捷方式图标

Android从web加载快捷方式图标,android,android-intent,Android,Android Intent,这就是我现在获得图标的方式: Intent shortcutIntent = getShortcutIntent(); Intent addIntent = new Intent(); addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, mAppData.title); Inten

这就是我现在获得图标的方式:

    Intent shortcutIntent = getShortcutIntent();

    Intent addIntent = new Intent();
    addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
    addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, mAppData.title);

    Intent.ShortcutIconResource shortcutIconResource = Intent.ShortcutIconResource.fromContext(MainApplication.getAppContext(), R.drawable.ic_launcher);

    addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, shortcutIconResource);
    addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");

    MainApplication.getAppContext().sendBroadcast(addIntent);
我想从网络上加载图标。这有可能吗