Android: Cómo instalar Apk como lo hace Android Market

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

preguntado el 31 de julio de 12 a las 10:07

So you are looking for a way to install an app without the user even knowing it? Sounds suspicious. -

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.. -

4 Respuestas

There is some information here :

Instalar aplicaciones de forma silenciosa, con permiso INSTALL_PACKAGES concedido

y aquí :

¿Cómo funciona la aplicación de instalación de AppBrain?

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.

Puedes echar un vistazo a la Android's Developer Distribution Agreement, article 4.5, if you want to publish your app on the Play Store.

contestado el 23 de mayo de 17 a las 13:05

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.

Respondido 31 Jul 12, 10:07

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

Respondido 31 Jul 12, 10:07

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

Respondido 31 Jul 12, 11:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.