Sunday, February 9, 2014

How to install the Android code under the assets folder apk



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:
reference to the 6th floor u010371578 reply:
the assets folder is read out of a stream, the stream is written in the SD card, then from the SD card in installation, such an approach I tried, I could wrong, resulting in no rookie help line


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:
The reply was deleted administrator at 2013-06-25 13:48:55

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