views:

42

answers:

1

Hi, I would like to install an APK from within an Android application. Can anyone give me an example of how to do this?

EDIT:

Also how do I open the install applications from unknown resources preference page so that users can change it?

EDIT:

I actually meant open the screen using code, so I can immediately open the preference page for the user to simply check the box, and press back. Is it possible to check to see if they allow non-market apps?

Can an application request permission enough to do this?

+1  A: 

use an intent with the link of your apk file.

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("http://movil.reforma.com/android/Android_Noticias_Reforma.apk"));
startActivity(intent);    

install applications from unknown resources preference

go to

Settings > Applications > Unknow sources

Jorgesys