简体   繁体   中英

Automatically update Android App on Tablet (i.e. without Market!)

I've written an Android App which is primarily targeted to Android Tablets without the Market installed, which means the user cannot easily update the App. My idea is to download the apk file and do whatever the MArket is doing with the apk file.

As the app is preinstalled on the Tablets there is no restriction in Permissions, but the device must not to be rooted.

Seems the following code allows the user to install the apk after detecting a new version and downloading the apk file:

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
startActivity(intent);

well i think that you just can do something like these. Verify version if version is lower app don't run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM