admin管理员组文章数量:1650974
//创建桌面快捷方式
Intent shortCutIntent =new Intent("com.android.launcher.action.INSTALL_SHORTCUT");
shortCutIntent.putExtra("duplicate",false);
shortCutIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME,"数字展厅V");
shortCutIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher));
Intent intent =new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
intent.setClass(getApplicationContext(), MainActivity.class);
shortCutIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, intent);
// 发送广播
getApplicationContext().sendBroadcast(shortCutIntent);
版权声明:本文标题:android系统桌面快捷方式图标不见了,通过创建快捷方式解决android平板图标消失的问题... 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1729545810a1205664.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论