code: static long getLastUpdateTime(Context context) {
          long lastTime = 0L;
          if (context != null) {
              try {
                  final PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                  lastTime = packageInfo.lastUpdateTime;
              } catch (Exception e) {
                  PrefHelper.LogException("Error obtaining LastUpdateTime", e);
              }
          }
  
          return lastTime;
      }
docs: Get the time at which the app was last updated, in milliseconds.
  @param context Context.
  @return the time at which the app was last updated.