With the help of this post "Android: install .apk programmatically". I have successfully made autoupgrade/autoinstall on my Android 2.3 device:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")), "application/vnd.android.package-archive");
startActivity(intent);
But it failed on Android 4.0(ICS) devices and gave me the error message:
an existing package by the same name with a conflicting signature is already installed
What could be wrong?
Thanks!