Is it possible to get the exact date and time that your user installed the application?
On iOS7 +, you can get a receipt for when the application was downloaded using [NSBundle appStoreReceiptURL]
.
Is it possible to get the exact date and time that your user installed the application?
On iOS7 +, you can get a receipt for when the application was downloaded using [NSBundle appStoreReceiptURL]
.
You can get the install time and date the first time the app was installed through packageManager
:
long installTime = context.getPackageManager()
.getPackageInfo("com.some.package.name", 0)
.firstInstallTime;
And their respective version:
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
version = pInfo.versionName;
Unfortunately, this date is reset every time the application is re-installed.
If you use the following code
PackageManager pm = context.getPackageManager();
ApplicationInfo appInfo = pm.getApplicationInfo("app.package.name", 0);
String appFile = appInfo.sourceDir;
long installed = new File(appFile).lastModified();
You'll be able to determine the app install date on Android, but the time will always change when it's updated.