For my private distributed android app, I am checking whether any update is available, from my distribution server using some web service every time user opens the app. If any update is available I am downloading the latest apk to SD card and there by calling below Intent. It will installs the new version.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(fileName)), "application/vnd.android.package-archive");
startActivity(intent);
At the time of installation, it is showing Replace Application Dialog with a message "The application you are installing will replace another application. All previous user data will be saved." with "OK" and "cancel" options. Instead of showing that Replace application dialog, I want something like update and cancel or allow automatic updating option just like some apps on android market providing. How to do it, plz give any suggestions.