/**
   * Checks if the app is already installed on the device.
   *
   * @param appIdentifier - App package name.
   * @return appInstalled - App installed status.
   */
  private boolean isAppInstalled(String appIdentifier) {
    boolean appInstalled = false;
    ArrayList<DeviceAppInfo> apps = new ArrayList<>(appList.getInstalledApps().values());
    for (DeviceAppInfo appInfo : apps) {
      if (appIdentifier.trim().equals(appInfo.getPackagename())) {
        appInstalled = true;
      }
    }

    return appInstalled;
  }