0

I have provided my android app on my website for download instead of Google Play Store. From my website user can download the apk file and can install that. How can I force that application to be install directly in the mobile instead of download?

Mohit Gupta
  • 87
  • 1
  • 14

2 Answers2

0

You can try following code and see if it works.

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.myweb.com/myapp.apk")));

Reference

Community
  • 1
  • 1
RPB
  • 16,006
  • 16
  • 55
  • 79
0

If you provide a link, and they open from browser it will automatically install for it.

 <a href="yourdomain.com/yourapp.apk">Download and install...</a>.

but only if users allow installation from 'Unknown sources' in settings/security.

smushi
  • 701
  • 6
  • 17