开发者

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

开发者 https://www.devze.com 2023-03-02 12:16 出处:网络
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

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开发者_StackOverflow 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号