在启动页oncreate()方法通过发送广播给桌面可创建快捷方式
//从sharepreference检查是否创建过
boolean isInstalled = SpUtil.getBoolean(getApplicationContext(), Constacts.SHORTCUT, false);
if (!isInstalled) {
Intent intent = new Intent();
intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "应用名称");
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));//The name of the extra used to define the icon, as a Bitmap, of a shortcut.
Intent startIntent = new Intent();
startIntent.setAction("android.intent.action.MAIN");
startIntent.addCategory("android.intent.category.LAUNCHER");
startIntent.addCategory("android.intent.category.DEFAULT");
startIntent.addCategory("android.intent.category.TAB");
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, startIntent);
sendBroadcast(intent);
//已创建,添加到sharepreference
SpUtil.putBoolean(getApplicationContext(), Constacts.SHORTCUT, true);