Click the built-in APK to install the APK that has been built into the system.
Package com. Wind. bbminstaller;
Import java. Io. file;
Import Android. App. activity;
Import Android. content. intent;
Import android.net. Uri;
Import Android. OS. Bundle;
Public class mainactivity extends activity {
Static final int request_install = 1;
@ Override
Protected void oncreate (bundle savedinstancestate ){
Super. oncreate (savedinstancestate );
Setcontentview (R. layout. Main );
Installproductname M ();
}
Private void installproductname M (){
Uri uri = URI. fromfile (new file ("/data/APP/bbm.apk "));
Intent intent2 = new intent (intent. action_install_package );
Intent2.setdata (URI );
Intent2.putextra (intent. extra_not_unknown_source, true );
Intent2.putextra (intent. extra_return_result, true );
Intent2.putextra (intent. extra_allow_replace, true );
Intent2.putextra (intent. extra_installer_package_name, getapplicationinfo (). packagename );
Startactivityforresult (intent2, request_install );
}
}
Install another built-in APK from one built-in APK