autoUpdate static method

GemError autoUpdate()

Triggers automatic content updates according to the configured auto-update settings.

Depending on the auto-update settings configured on the SdkSettings.offBoardListener, this may initiate checks for roadmap, style, voice and car model updates and can trigger callbacks registered on SdkSettings.offBoardListener.

Returns

Implementation

static GemError autoUpdate() {
  if (offBoardListener.isAutoUpdateForRoadMapEnabled) {
    final GemError err = ContentStore.checkForUpdate(ContentType.roadMap);
    if (err != GemError.success) {
      return err;
    }
  }

  if (offBoardListener.isAutoUpdateForViewStyleHighResEnabled) {
    final GemError err = ContentStore.checkForUpdate(
      ContentType.viewStyleHighRes,
    );
    if (err != GemError.success) {
      return err;
    }
  }

  if (offBoardListener.isAutoUpdateForViewStyleLowResEnabled) {
    final GemError err = ContentStore.checkForUpdate(
      ContentType.viewStyleLowRes,
    );
    if (err != GemError.success) {
      return err;
    }
  }

  if (offBoardListener.isAutoUpdateForHumanVoiceEnabled) {
    final GemError err = ContentStore.checkForUpdate(ContentType.humanVoice);
    if (err != GemError.success) {
      return err;
    }
  }

  if (offBoardListener.isAutoUpdateForComputerVoiceEnabled) {
    final GemError err = ContentStore.checkForUpdate(
      ContentType.computerVoice,
    );
    if (err != GemError.success) {
      return err;
    }
  }

  if (offBoardListener.isAutoUpdateForCarModelEnabled) {
    final GemError err = ContentStore.checkForUpdate(ContentType.carModel);
    if (err != GemError.success) {
      return err;
    }
  }

  return GemError.success;
}