android - Run code when application is installed -
i need know if possible execute code when application installed. i've seen there way run when starts first time. need run code when installs.
i have application develop , go store (ibm store), when application downloaded play store creates icon in "desktop" of phone. ibm store not happen, had code
intent shortcutintent = new intent(getapplicationcontext(), mainactivity.class); shortcutintent.addflags(intent.flag_activity_new_task); shortcutintent.addflags(intent.flag_activity_clear_top); intent addintent = new intent(); addintent.putextra(intent.extra_shortcut_intent, shortcutintent); addintent.putextra(intent.extra_shortcut_name, "movistar click"); addintent.setaction("com.android.launcher.action.uninstall_shortcut"); getapplicationcontext().sendbroadcast(addintent); addintent.putextra(intent.extra_shortcut_icon_resource, intent.shortcuticonresource.fromcontext(getapplicationcontext(), r.mipmap.icon)); addintent.setaction("com.android.launcher.action.install_shortcut"); getapplicationcontext().sendbroadcast(addintent);
however code executed when application opens, not when installed.
is there way run code when application installed?
i need know if possible execute code when application installed.
no, sorry.
but need run code when installs
so malware authors.
when application downloaded play store creates icon in "desktop" of phone
that user , home screen implementation, potentially app distribution channel. so, example, have turned off — both @ play store , @ home screen — because imho stupid "feature".
i had code
there no requirement every home screen implementation support broadcast. note replaced outright on android 8.0 different system.
Comments
Post a Comment