2

When you install an app from Google Market, you have an install button, which downloads and automatically starts the installation program for the apk you just downloaded. It doesn't install it automatically, only it automatically launches the installer for the apk you just downloaded.

Is it possible to have a similar button if you have a apk file on your local server? How will the link look like?

I've read a lot of almost similar questions here (like this one How to install APK automatically when the file download is complete (hosted on private) or how to automatically install an apk), but none of the answers explained if Google uses something special for its market or is it possible to use a special kind of a link to force the installation program from the phone to automatically launch after download? Automatically LAUNCH, not automatically INSTALL the apk.

That is, when users scans my QR code with a QR code reader or types directly the URL in the browser, how can my application trigger the installer program right after download?

Let's say I do the following: 1. I generate a private key on my computer 2. I sign my app with my private key 3. I submit my app to Google market 4. I upload my app to my site.

When someone will download my app from Google Market, the following will happen: a) That person will access the Google Market URL of my app b) He will download it to his phone c) The application installer from the phone will start automatically, and ask him if he agrees with the permission required by the app.

When someone will download my app from my site, the following will happen: a) That person will access the Google Market URL of my app b) He will download it to his phone c) The application installer from the phone will NOT start automatically.

I don't want the app to install without any intervention from the user, just for the install process to start automatically after download.

My question is how to make c) to happen even if he downloads the same app, signed with the same signature, but from my site?

Community
  • 1
  • 1
user1219995
  • 21
  • 1
  • 3

1 Answers1

5

The simple answer is: You can't (at least if I'm remembering correctly).

AOSP contains a set of Google's public keys that they sign their applications with. And in order to be able to install an application without any intervention from the user, the apk must be signed with the matching private key. So, in order to do this, you will have to do one of two things:

  1. Get google's private key and sign your apk with it.
  2. Get everyone to upgrade their phone to have your public keys along side google's.

Neither of these are really possible. So basically, you can't. Unless your targeting the root/rom community. Then you might be able to convince them to do #2 (add you to the list of keys that can install apps without intervention).

Leif Andersen
  • 21,580
  • 20
  • 67
  • 100
  • Thank you for the answer. I updated the question, regarding "the apk must be signed with the matching private key". – user1219995 Feb 20 '12 at 02:31