Original
Http://www.cnblogs.com/keyindex/articles/1819504.html
Note: The essence, put their new version of the APK can be downloaded in the place, first set up their own communications, check the version, I am directly in the cloud, of course, can also be placed on their own computer, you can use
FTP file server under the same wireless access download, or through peanut shell mapping remote Download
The original version of the affected, the last part of the installation needs to be modified, and so I organize and then edit this post
Private voidUpdate () {//Install the appIntent Intent =NewIntent (Intent.action_view); //determine if it is a androidn and a higher version if(Build.VERSION.SDK_INT >=Build.version_codes. N) {intent.setflags (intent.flag_grant_read_uri_permission); Uri Contenturi= Fileprovider.geturiforfile (Getapplicationcontext (), buildconfig.application_id +". Fileprovider",NewFile (Environment. getExternalStorageDirectory (), download_name)); Intent.setdataandtype (Contenturi,"application/vnd.android.package-archive"); } Else{intent.setdataandtype (Uri.fromfile (NewFile (Environment. getExternalStorageDirectory (), download_name)),"application/vnd.android.package-archive"); Intent.setflags (Intent.flag_activity_new_task); }//Intent.setdataandtype (Uri.fromfile (New File (Environment//. getExternalStorageDirectory (), download_name)),//"Application/vnd.android.package-archive");StartActivity (Intent);
Android App update-auto-detect version and automatic upgrade