Skip to main content

Version control of the local service

The SDK right operation requires a minimum compatible ALS version, however not always the last ALS available version is necessary for its operation.

Tip: try always to keep the ALS updated to the user, so it can enjoy the last functionalities, corrections and possible improvements in the accuracy of voice recognition.

Incompatible version

When starting the SDK, the verification of ALS installed version is made. If the installed version is not compatible, the event IaraEvent.INIT_FAIL is triggered and the recognizer won't be able to make any voice recognition.

IMPORTANT: in this case, you must provide to the user the download information of the recommended version, which can be found in recognition.internal.settings.alsInstallInfo.

There is a new version available

If the installed ALS version is compatible, but there is an available update, the event IaraEvent.NEWER_ALS_AVAILABLE will be triggered.

The event can be heard in this way:

recognition.addEventListener(IaraEvent.NEWER_ALS_AVAILABLE, function(event) {
console.log(event.detail);
});

The relevant event information can be accessed in event.detail.data, and they are:

  • The available version, in availableVersion;
  • The current version, in currentVersion;
  • The download progress, in: downloadProgress;
  • If the available version is ready to be installed, in readyToUpdate.
IMPORTANT: we avoid as much as possible make mandatory updates to a same SDK version, but they can eventually happen for bug corrections.