![]() This could be the case for some app plug-ins and apps that provide background services. apk installed? I tried this code in the launcher activity, it creates broken(another story) shortcut every time app starts. If the issue persists, it may be because the app does not have an icon. Where this code should go to make shortcut added after. ShortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) Ĭreate shortcut itself Intent addIntent = new Intent() ĪddIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent) ĪddIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Shortcut Name") ĪddIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, (context, R.drawable.icon)) ĪtAction(".INSTALL_SHORTCUT") Later, you can find the apps youve hidden by zooming out on the home screen and. ![]() ShortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) These instructions will work perfectly on both iPhone and Android. Ex (from cgeek): Intent shortcutIntent = new Intent() I know it's not documented and won't work on every device, but I see more and more apps placing their shortcuts on the home screen after they got installed.įound bunch of code chunks how to do it but for me they don't fit together.Ĭreate an Intent of activity that should be called. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |