Skip to content

Security options#

LUNA ID provides protection measures against the use of potentially dangerous devices.

Virtual camera usage check#

Applies to LUNA ID for Android only.

The virtual camera protection feature enhances security by detecting if the device's physical camera has been replaced by a virtual one.

Implementation#

Step 1: Add dependency#

To use the feature, include the security module in your project. Add the following dependency to your build.gradle.kts file:

dependencies {
    ...
    implementation("ai.visionlabs.lunaid:security-arm:X.X.X.aar")
}

Step 2: Perform the check#

The following example demonstrates how to run the check:

securityCheck = SuspiciousDeviceDetector.Impl(this)
someCoroutineScope.launch {
    Log.e("SuspiciousDetector", "result: ${securityCheck.detect()}")
}

The detect() method is a suspend function and must be called from a coroutine.

Understanding the result#

  • The SecurityCheck.Failure result indicates that at least one sign of a virtual camera was detected.
  • The SecurityCheck.Success result indicates that no signs were found.

Disabling the check#

The virtual camera usage check is enabled by default. To disable the check, set the checkSecurity property to false when launching the camera. For example:

LunaID.showCamera(
    activity,
    LunaID.ShowCameraParams(
    checkSecurity = false // Explicitly disables the security check
    )
)

If the checkSecurity parameter is omitted, it defaults to true, and the check will be performed.

Jailbreak check#

Applies to LUNA ID for iOS only.

LUNA ID can tell you if your device has been jailbroken. If there has been an attempt to jailbreak your device, the LMCameraCaptureManagerDelegate::deviceIsJailbroken() method will be returned.