1

I'm trying to make my website sending Android APK files with some pre-validation so the user just clicks the link and the application starts to install on the device.

The point is, i'm using the thin webserver, send_file path, :type => 'application/vnd.android.package-archive', :disposition => "attachment", set the header headers['Content-Type'] = 'application/vnd.android.package-archive' and checked the Allow untrusted sources box at the device' settings. But the apk file is just downloaded instead of being installed.

UPD: The following trouble issues on Android 4 only. My Galaxy S with Android 2.3.6 works fine.

What am i doing wrong?

Thanks!

shybovycha
  • 11,556
  • 6
  • 52
  • 82
  • For obvious security reasons, I doubt that it is possible to trigger the installation of an APK by simply clicking a link a web page. User will still have to click on the downloaded APK to install it. – Sébastien Nov 07 '12 at 11:52
  • @Sebastien contra: http://stackoverflow.com/questions/6211416/hosting-an-apk-file-on-over-own-site – shybovycha Nov 07 '12 at 11:57
  • I don't understand what you mean: the question you refer to is basically the same as yours, and there is no correct answer to it. Both answers assume that the user wants to install the APK from another app, whereas what you want is the user to be able to install the APK from the Android browser. – Sébastien Nov 07 '12 at 13:16
  • @Sebastien okay, here's the more concrete link: http://stackoverflow.com/questions/2328459/apk-installation-from-web-page – shybovycha Nov 07 '12 at 13:31
  • @Sebastien please, comment/answer only if there's no solution **for sure** or you do have a solution. Or just do not write at all either. I am sorry if that sounds rude but i think that is the _how to be polite rule_. – shybovycha Nov 07 '12 at 13:33
  • I would really like to test this on my 2.3.6 device, because I consider this a rather big security breach in Android. By any chance could you post a link to a test apk file ? – Sébastien Nov 07 '12 at 14:57

0 Answers0