1

I want to call android intent to Packageinstaller app to install a downloaded Apk. I'm using this link to call this Intent from a webpage in Chrome :

<a href="intent:///sdcard/download/myapp.apk#Intent;scheme=file;action=android.intent.action.VIEW;type=application/vnd.android.package-archive;end">install app</a>

But, It's not working and Packageinstaller event doesn't show up.

You can see the Packageinstaller Manifest here : https://android.googlesource.com/platform/packages/apps/PackageInstaller/+/master/AndroidManifest.xml

And here is a document on android Intent in Chrome: https://developer.chrome.com/multidevice/android/intents

Please tell me how to fix the problem, or open Apk file in android from html in Chrome, in any possible way.

Thanks

aboalfazl
  • 11
  • 1
  • Possible duplicate of [How to install APK automatically when the file download is complete (hosted on private)](https://stackoverflow.com/questions/7439684/how-to-install-apk-automatically-when-the-file-download-is-complete-hosted-on-p) – Morrison Chang Jan 06 '18 at 15:20
  • From the Chrome intent document: `Only activities that have the category filter, android.intent.category.BROWSABLE are able to be invoked using this method as it indicates that the application is safe to open from the Browser.` Note that the BROWSABLE category isn't listed in the PackageInstaller Manifest. – Morrison Chang Jan 06 '18 at 15:37

0 Answers0