问题
After downloading app from play store, its not creating shortcut icon on home screen(it creates icon in app drawer). While this thing working fine on most of devices. But for some devices. App is not creating shortcuts.
I have checked:
a) Play store settings and Auto-Add widgets is marked.
b) Launcher settings automatically add shortcut to screen is market.
Is there anything at programmer end? Can we write some code which will result in shortcut when app downloaded from play store?
回答1:
I don't think this is a bug coming from the application, it's more of a bug may be device bug probably. I'd check the caches on your device, ROM settings, etc.
回答2:
There is nothing wrong with programmer ensure you have checked Add icon Home screen check box, In some cases programmer may have written this code
Intent shortcutIntent = new Intent(getApplicationContext(),MainActivity.class);
shortcutIntent.setAction(Intent.ACTION_MAIN);
Intent addIntent = new Intent();
addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "AppName");
addIntent.setAction("com.android.launcher.action.UNINSTALL_SHORTCUT");
getApplicationContext().sendBroadcast(addIntent);
To remove short-cut which is going to be created by play store even after "Add icon to Home screen" checked. So this Solution can help you out.
回答3:
Try this:
Go the home screen, hit apps then options (three dots at top right).
It had 'DOWNLOADED APPS' go into that then hold desired icon to create shortcut onto ur main screens.
Hope it works.
来源:https://stackoverflow.com/questions/17951352/android-app-not-creating-shortcut-icon-on-home-screen-downloaded-from-play-stor