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:

  1. add service in app listen action_package_added
  2. in service, check if name match 1 want trigger event want..
  3. launch intent in question , wait service triggered..

this may not simple want think way.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -