---
title: Liveness Settings
description: Liveness settings available in the PingOne Recognize SDK.
component: recognize
page_id: recognize:mobile-sdk:mobile-sdk-liveness-settings
canonical_url: https://docs.pingidentity.com/recognize/mobile-sdk/mobile-sdk-liveness-settings.html
llms_txt: https://docs.pingidentity.com/recognize/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: April 20, 2026
section_ids:
  liveness-configuration: Liveness Configuration
  configuring-livenessenvironmentaware: Configuring livenessEnvironmentAware
  relax-liveness-checks-for-testing-purposes: Relax Liveness Checks for Testing Purposes
  android: Android
  ios: iOS
  flutter: Flutter
  react-native: React Native
---

# Liveness Settings

## Liveness Configuration

PingOne Recognize SDK provides three officially supported configurations for liveness detection (anti-spoofing component), listed from lowest to highest security:

* `DEVELOPMENT` - testing purposes only

* `LEVEL_1` - most production use (current SDK default)

* `LEVEL_2` - higher-security production use (recommended)

Increasing security level increases the system's ability to reject spoof attempts (true positive rate, TPR). A higher security level can also increase genuine reject rate (false positive rate, FPR) and time required by the anti-spoofing module to decide.

For most production scenarios, PingOne Recognize recommends `LEVEL_1`, which offers a practical tradeoff between TPR, FPR, and time-to-decision. For scenarios requiring higher security, increase to `LEVEL_2`.

## Configuring `livenessEnvironmentAware`

The `livenessEnvironmentAware` feature enforces stricter environmental checks during liveness and can add an additional layer of protection against certain biometric attacks. This is set to `false` by default from SDK v5.3.3 and above.

On a limited set of devices, this can prevent some users from authenticating with PingOne Recognize, in which case the SDK returns `20021`.

|   |                                                                                                                                                                                                                                           |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | For security purposes, implementation details of this liveness feature are not documented here. Contact the PingOne Recognize team if you need deeper detail on the feature and the observed security/UX tradeoffs for `true` vs `false`. |

## Relax Liveness Checks for Testing Purposes

The following examples are for **testing purposes only** and help test the happy path for passing liveness checks.

### Android

```kotlin
// ONLY FOR TEST

// Authentication Configuration
val authConfig = BiomAuthConfig(
        livenessConfiguration = LivenessSettings.LivenessConfiguration.DEVELOPMENT,
        livenessEnvironmentAware = false
)


// Enrollment Configuration
val enrollConfig = BiomEnrollConfig(
        livenessConfiguration = LivenessSettings.LivenessConfiguration.DEVELOPMENT,
        livenessEnvironmentAware = false
)


// De-Enrollment Configuration
val deEnrollConfig = BiomDeEnrollConfig(
        livenessConfiguration = LivenessSettings.LivenessConfiguration.DEVELOPMENT,
        livenessEnvironmentAware = false
)
```

### iOS

```swift
// ONLY FOR TEST

// Authentication Configuration
let authConfig = BiomAuthConfig(
        livenessConfiguration: Keyless.LivenessConfiguration.DEVELOPMENT,
        livenessEnvironmentAware: false
)

// Enrollment Configuration
let enrollConfig = BiomEnrollConfig(
        livenessConfiguration: Keyless.LivenessConfiguration.DEVELOPMENT,
        livenessEnvironmentAware: false
)

// De-Enrollment Configuration
let deEnrollConfig = BiomDeEnrollConfig(
        livenessConfiguration: Keyless.LivenessConfiguration.DEVELOPMENT,
        livenessEnvironmentAware: false
)
```

### Flutter

```dart
// ONLY FOR TEST

// Authentication Configuration
final authConfig = BiomAuthConfig(
    livenessConfiguration: LivenessConfiguration.PASSIVE_STANDALONE_MEDIUM,
    // livenessEnvironmentAware: false - not available yet
);

// Enrollment Configuration
final enrollConfig = BiomEnrollConfig(
    livenessConfiguration: LivenessConfiguration.PASSIVE_STANDALONE_MEDIUM,
    // livenessEnvironmentAware: false - not available yet
);

// De-Enrollment Configuration
final deEnrollConfig = BiomDeEnrollConfig(
    livenessConfiguration: LivenessConfiguration.PASSIVE_STANDALONE_MEDIUM,
    // livenessEnvironmentAware: false - not available yet
);
```

### React Native

```text
// ONLY FOR TEST

// Authentication Configuration
const authConfig = new BiomAuthConfig({
    livenessConfiguration: LivenessConfiguration.PASSIVE_STANDALONE_MEDIUM,
    livenessEnvironmentAware: false,
});

// Enrollment Configuration
const enrollConfig = new BiomEnrollConfig({
    livenessConfiguration: LivenessConfiguration.PASSIVE_STANDALONE_MEDIUM,
    livenessEnvironmentAware: false,
});

// De-Enrollment Configuration
const deEnrollConfig = new BiomDeEnrollConfig({
    livenessConfiguration: LivenessConfiguration.PASSIVE_STANDALONE_MEDIUM,
    livenessEnvironmentAware: false,
});
```
