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 is only available in LUNA ID for Android. It allows you to detect the replacement of the device camera with a virtual one.

Implementation#

To implement the virtual camera protection feature, specify lunaid-security-arm-X.X.X.aar as a dependency in the build.gradle.kts file:

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

Important: Regardless of the use of the check, you must implement the security module.

Usage example#

Below is an example of a suspicious device check:

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

The detect method is a suspend function.

If at least one sign of using a virtual camera is detected, the SecurityCheck.Failure event appears.

The SecurityCheck.Success event appears if no signs of using the emulator were detected.

Disabling the check#

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

val lunaConfig = LunaConfig.create(
    checkSecurity = false
)

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.