- First, I have server.I check to see if there is a
new apk file that I download and try to install. - If the server has a
new version of apk file , then I want to update my .apk file . - I want to install / upgrade without user interaction . Is it possible?
- If user interaction is required, then how to install / update the .apk file.
I no longer have an idea about this.
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "jarviz.apk")), "application/vnd.android.package-archive"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
But this does not work .WHen I am debugging, I do not see any error, but it does not install. How can i do this. Sorry for the bad english.
Maidul
source share