In one application, a button or other control, after listening events will pop up that interface to install apk, seeking God who can give me a big help, beg ah
Reply:
patch = activity (). getAssets () Gets the path
Intent intent = new Intent (Intent.ACTION_VIEW);
intent.setDataAndType (Uri.parse ("patch" + "solitaire.apk"),
"Application / vnd.android.package-archive");
startActivity (intent);
Try
Reply:
sorry my mistake patch up the wrong interpretation
. getResources () getAssets () openFd ("asd.xml") toString ();..
The following documents are attrs asd.xml
Reply:
Or wrong, I too pit father.
# Public void onCreate (Bundle savedInstanceState) {
# Super.onCreate (savedInstanceState);
# SetContentView (R.layout.main);
#
# Intent intent = new Intent (Intent.ACTION_VIEW);
# Intent.setDataAndType (Uri.parse ("file :/ /"
# + "/ Sdcard / solitaire.apk"),
# "Application / vnd.android.package-archive");
# StartActivity (intent);
This is the sd card installation methods
Reply:
It is said that assets directory files can only get input and output streams, so it is not possible then output to a new file, and then call the procedure to install Android?
Reply:
His way through the file input stream SDK wrote the following store, and then install the APK SDK under it.
Reply:
The assets folder is read out of a stream, the stream is written in the SD card, and then install from SD card, so that way I tried, I could wrong, resulting in no rookie help line
Reply:
If placed in the sd card is successful, a direct call
Intent intent = new Intent (Intent.ACTION_VIEW);
intent.setDataAndType (Uri.parse ("patch" + "solitaire.apk"),
"Application / vnd.android.package-archive");
startActivity (intent);
Pop-up window to install, ~ pay attention to the correct path uri
Reply:
First read the file and then install it onto the sd
Reply:
It says it has been very comprehensive, and I do not say it.
Reply:
Reply:
How does the installation interface pops up, let it be installed directly
Reply:
Write out what the reason can not be installed later apk
No comments:
Post a Comment