android - Unable to start application on shorcut home icon click -
i have create shortcut icon on home of application using code:
intent shortcutintent = new intent(context, list.get(i).activityinfo.applicationinfo.name.getclass()); shortcutintent.setaction(intent.action_main); intent addintent = new intent(); addintent.putextra(intent.extra_shortcut_intent, shortcutintent); addintent.putextra(intent.extra_shortcut_name, manager.getapplicationlabel(list.get(i).activityinfo.applicationinfo)); addintent.setaction("com.android.launcher.action.install_shortcut"); parcelable icon = intent.shortcuticonresource.fromcontext(context, r.mipmap.ic_launcher); addintent.putextra(intent.extra_shortcut_icon_resource, icon); context.sendbroadcast(addintent);
i unable start application on shortcut icon click on home.
Comments
Post a Comment