Best shot error notifications#
In LUNA ID for Android#
A best shot error notification is displayed as soon as an error occurs. The next notification may not be sent earlier than in a second. If a second has passed, the new notification will be displayed immediately.
When multiple errors occur within a second, notifications are sent simultaneously. The number of notifications sent is determined by the maxMessages
parameter in the event-receiving function.
The default parameter value is 1.
The maximum parameter value is 3.
fun allEvents(maxMessages: Int = 1)
If you need to hide a notification, you can link the hiding to the appropriate event, for example, to ResultSuccess
.
In LUNA ID for iOS#
The LMErrorPresenter
class has an object that allows you to manage error notifications. LMErrorPresenter
accumulates an array of errors that occurred over the past second, and then passes them out via the LMErrorPresenterDelegate
protocol in the func send(errors: [Error])
method.
The error presenter object is contained in the LMBestShotService
class and is not accessible directly. It only works with the LMBestShotServiceDelegate
delegate, which forwards the LMErrorPresenterDelegate
methods.
The errors: [Error]
array can contain from 0 to 3 errors. You can specify the number of errors by using the errorLimit: Int
argument in the LMBestShotService
constructor. The limit can take values from 0 to 3. The default value is 3.
Errors are sorted in descending order by two criteria:
- The most common ones
- The most critical ones
Important: Even one critical error will be of a higher priority than a repeatedly occurring non-critical one. In the absence of critical errors, errors will be displayed according to priorities. The list of error priorities (in descending order) is given below.
Critical errors#
The below errors lead to an immediate session termination.
Error | Code | Description |
---|---|---|
INTERACTION_TIMEOUT |
1007 | The frame was not received in the time interval allotted for the best shot. |
PRIMARY_FACE_CRITICAL_LOST |
1027 | The primary face that was detected in the video stream has been lost. |
LIVENESS_ERROR |
1004 | The OneShotLiveness estimation failed. |
Non-critical errors#
Non-critical errors inform you that you are doing something wrong when trying to get the best shot.
Error | Code | Description |
---|---|---|
MULTIPLE_FACES |
1003 | The frame must contain only one face for LUNA ID to perform a series of estimations, and then select the best shot. |
FACE_LOST |
1022 | The face that was detected in the video stream has been lost. The session will not be terminated. |
BORDERS |
1017 | The bounding box size with the detected face does not correspond to the specified size. |
TOO_FAR |
1016 | The bounding box size with the detected face does not correspond to the specified size. |
OCCLUDED_FACE |
1010 | The face is not properly visible in the input image. |
BAD_HEAD_POSE |
1002 | Head rotation angles are not between the minimal and maximum valid head position values. |
IMAGE_IS_BLURRED |
1011 | The input image does not meet the blurriness threshold. |
IMAGE_IS_UNDEREXPOSED |
1012 | The input image does not meet the darkness threshold. |
IMAGE_IS_OVEREXPOSED |
1013 | The input image does not meet the lightness threshold. |
SUNGLASSES_DETECTED |
1024 | The person in the input image is wearing sunglasses. |
EYES_CHECK_FAILED |
1026 | The eye state estimation failed. |
BAD_QUALITY |
1001 | The input image does not meet image quality thresholds. |
Любая ошибка, не указанная в списке, имеет приоритет ниже, чем у всех указанных. В случае, когда ошибок больше, чем 3, выбираются первые три наивысших по приоритету, остальные отбрасываются.
Other errors that are not listed above have a lower priority. For a full list if errors, see Status codes and errors.
In case there are more than 3 errors, the first 3 highest priority ones are selected, the rest are discarded.