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开发者_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.
精彩评论