Skip to content

Disabling OneShotLiveness estimation#

If you want to skip a liveness estimation over the best shot, you can disable a OneShotLiveness estimation.

In LUNA ID for Android#

To disable OneShotLiveness estimations, set the livenessType: LivenessType field to None in LunaConfig.

If livenessType: LivenessType is not specified, OneShotLiveness estimations are disabled by default.

The example below shows how to disable OneShotLiveness estimations:

val apiConfig = ApiHumanConfig("http://luna-platform.com/api/6/")
    LunaID.init(
        ...
        apiHumanConfig = apiConfig,
        lunaConfig = LunaConfig.create(
         livenessType = LivenessType.None,
        ),
    )

In LUNA ID for iOS#

Disable Online OneShotLiveness estimation#

To disable Online OneShotLiveness estimation, disable sending of OneShotLiveness estimation requests to LUNA PLATFORM 5 by setting livenessType to .none. For example:

private lazy var configuration: LCLunaConfiguration = {
       let configuration = LCLunaConfiguration.defaultConfig()
       ...
       configuration.bestShotConfiguration.livenessType = .none
       ...
       return configuration
}()

Disable Offline OneShotLiveness estimation#

To disable Offline OneShotLiveness estimation, set the useOfflineLiveness parameter to false in the LCLunaConfiguration structure:

LCLunaConfiguration.useOfflineLiveness = false