In my project I have a code that download a new version of the app hosted in dropbox.com for updating old version. After download is completed, app installion intent is called like below.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(baseDir+fileName)), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // without this flag android returned a intent error!
mContext.startActivity(intent);
There is something I want to know is whether user do installation or not, if user install new version successfully, I have to save the version that the user installed in database. So I need to know the user did installation. Any suggestion is greatly appreciated.
Thanks in advance