On Thu, Mar 7, 2013 at 5:52 PM, JavaSrvcs <[email protected]> wrote:
> Inside an activity, I want to be able to install an app
> From the Google Play Store
> From a url: http://host/path_to/app.apk
These are mutually exclusive. One URL can *either* point to the Play
Store *or* point to your own Web site, not both.
Moreover, there is no way to point to the Play Store to trigger an
immediate download AFAIK.
> When the above code is run, I get this exception in the debugger
> // android.content.ActivityNotFoundException: No Activity found to
> handle Intent { act=android.intent.action.VIEW
> typ=application/vnd.android.package-arc
That's because you did not download the APK file. The installer will
not handle http: Uri values. You need to download the APK yourself to
external storage, then trigger an install of the downloaded APK.
> I am also looking for a way to install an app via the market URI, I have
> tried half a dozen examples and nothing works.
That's not supposed to work. You can lead the user to the Play Store
page for an app, but you cannot force the user to download it.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
_The Busy Coder's Guide to Android Development_ Version 4.6 Available!
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.