android - Programmaticaly install app from google play and get response -
i starting google play store within app install targeted app.
i know can achieved using this:
try { startactivity(new intent(intent.action_view, uri.parse("market://details?id=" + apppackagename))); } catch (android.content.activitynotfoundexception anfe) { startactivity(new intent(intent.action_view, uri.parse("http://play.google.com/store/apps/details?id=" + apppackagename))); }
question is - there way know if app installed using intent? startactivityforresult()
work here? kind of response can expect?
after you've launched intent yo, app can watch broadcast action_package_added
(see doc here).
what should is:
- add service in app listen
action_package_added
- in service, check if name match 1 want trigger event want..
- launch intent in question , wait service triggered..
this may not simple want think way.
Comments
Post a Comment