1

I am new to android. I could install an APK pro-grammatically which is present in the SD card ..It will prompt the user to install the APK. But i need to install without prompting, as we do in Android Market (Google Play), where we click INSTALL and automatically the app gets installed without prompting.

Note:* I found some links on stackoverflow, but all those mechanism will prompt the user.

How to do this? Plz help

Sudarshan
  • 1,291
  • 3
  • 26
  • 35
  • So you are looking for a way to install an app without the user even knowing it? Sounds suspicious. – comodoro Jul 31 '12 at 09:22
  • No No.. I ll prompt the user whether he need to install the package through alert dialog..Based upon his/her selection i thought to install the selected apk silently.. – Sudarshan Jul 31 '12 at 09:37

4 Answers4

1

There is some information here :

Install apps silently, with granted INSTALL_PACKAGES permission

and here :

How does AppBrain's installation app work?

I don't think is a really good idea to install something without telling it to the user and/or without showing him the permissions you're asking for. In the second link, CommonsWare give a really good comment about this idea.

You can take a look on the Android's Developer Distribution Agreement, article 4.5, if you want to publish your app on the Play Store.

Community
  • 1
  • 1
mithrop
  • 3,283
  • 2
  • 21
  • 40
0

I'm pretty sure you can't. I suppose Play Store has access to APIs that you can't use because it is signed with the Google key.

rciovati
  • 27,603
  • 6
  • 82
  • 101
0

Your apps needs to be signed with platform signature to install apps directly from your app.

nandeesh
  • 24,740
  • 6
  • 69
  • 79
0

Could you please make it clear what exactly do you mean by "I could install an APK pro-grammatically which is present in the SD card " & "need to install without prompting".

But according to my guess of what you actually mean, if you want the install APKs which are not from the market, then check the option 'Unknown Sources' in the security tab of settings. AFAIK only then you would be able to install unsigned APKs

Code_Yoga
  • 2,968
  • 6
  • 30
  • 49