Skip to content
On this page

Alerts

Alerts are messages that are sent from SDK to the application when a malfunction occurs. There are two alert categories:

  • Warning - indicates a minor, temporary issue that does not interrupt the current operation.
  • Error - indicates a severe incident that cannot be resolved by the SDK and results in the termination of any in-progress measurement.

The alert object contains a numeric code that represents a specific issue.

The reasons for warnings and errors can vary - from accuracy problems to incorrect API usage, to license issues or even device-related errors.

Receiving Alerts

In the event that an alert is received, it is recommended to display the numeric alert code in the UI for reference. If the alert is related to a misuse of the SDK or to improper measurement conditions, and the issue persists, please contact the Binah.ai support team via https://www.binah.ai/contact/.

The application can receive alerts by implementing onError and onWarning as part of SessionInfoListener .

Dart
@override
void onSessionStateChange(SessionState sessionState) {
    // Receive session state updates
}

@override
void onWarning(WarningData warningData) {
    // Receive warnings
}

@override
void onError(ErrorData errorData) {
    // Receive errors
}

@override
void onLicenseInfo(LicenseInfo licenseInfo) {
    // Receive license info 
}

@override
void onEnabledVitalSigns(SessionEnabledVitalSigns enabledVitalSigns) {
    // Receive the enabled vital signs for the session
}

Warnings

A warning indicates a minor, temporary issue. While a warning does not interrupt the measurement, it is encouraged to guide the user on how to avoid such warnings in the future, and to follow the Binah.ai best practices for taking a measurement.

Dart
@override
void onWarning(WarningData warningData) {
    print("WARNING", "Received Warning. Domain: ${warningData.domain} Code: ${warningData.code}");
}

Errors

An error indicates a severe incident from which the SDK cannot recover. Some of the common reasons for errors include network issues, CPU overload, insufficient lighting, and sub-standard environmental conditions. See the Alerts List for details on each error.

When an error occurs during the measurement, the SDK will terminate any ongoing measurement and will refrain from sending vital sign results to the application. Additionally, the session state will transition from measuring to stopping (see Session States).

Internal Errors

If an invalid SDK internal state occurs during the operation of the SDK, an internal error will be returned to the application. The internal error number may not appear in the Alerts List page. As mentioned earlier, it is advisable to display the error number in the user interface for reference.

If an internal error is received, please report it to the Binah.ai support team at https://www.binah.ai/contact/. Include the error code you received and provide a detailed description of the problem.

Dart
@override
void onError(ErrorData errorData) {
    print("Received Error. Domain: ${errorData.domain} Code ${errorData.code}");
}