Reputation: 1291
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
Upvotes: 1
Views: 4629
Reputation: 3248
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
Upvotes: 0
Reputation: 24820
Your apps needs to be signed with platform signature to install apps directly from your app.
Upvotes: 0
Reputation: 3353
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.
Upvotes: 1
Reputation: 28063
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.
Upvotes: 0