Get Application Installed Date on Android

First Time It Was Installed

activity.getPackageManager().getPackageInfo( activity.getPackageName(), 0 ).firstInstallTime;

Last Time It Was Updated

activity.getPackageManager().getPackageInfo( activity.getPackageName(), 0 ).lastUpdateTime;

Use this code:

PackageManager pm = context.getPackageManager();
ApplicationInfo appInfo = pm.getApplicationInfo("app.package.name", 0);
String appFile = appInfo.sourceDir;
long installed = new File(appFile).lastModified();

or this one (API Level 9 upwards!):

long installed = context
    .getPackageManager()
    .getPackageInfo(context.getPackag‌​eName(), 0)
    .firstInstallTime
;