Package com.leia.sdk

Class LeiaSDK.InitArgs

    • Field Detail

      • licenseKey

        @Nullable
        public String licenseKey
        CNSDK requires a valid license key. Contact Leia Support to get one.
        See Also:
        #isLicenseRequired()
      • enableValidation

        public boolean enableValidation
        Whether to do runtime validation or not. When enabled, all java calls made into LeiaSDK after it was shutdown will throw an exception. The native-side validation is also enabled.
      • useSharedCameraSink

        public boolean useSharedCameraSink
        Whether to use the SharedCameraSink or not. Valid only for in-app CNSDK.
        See Also:
        #isFaceTrackingInService()
      • enableFaceTracking

        public boolean enableFaceTracking
        Whether to initialize face tracking ASAP or not.

        If your app does not use InterlacedSurfaceView, set this to false.

        If your app does not need face tracking to start ASAP, pause tracking using LeiaSDK.startFaceTracking(boolean) after LeiaSDK.createSDK(InitArgs). If your app is going to use face tracking, it's always better to initialize it ASAP and keep it initialized because it takes almost a second to initialize it.

      • startFaceTracking

        public boolean startFaceTracking
        Whether to start face tracking right after initialization or not.
      • faceTrackingRuntime

        public FaceTrackingRuntime faceTrackingRuntime
        Initial face tracking runtime.
      • requiresFaceTrackingPermissionCheck

        public boolean requiresFaceTrackingPermissionCheck
        Whether to require face tracking permission to be granted.

        If your app is a 3D app that is going to use face tracking, in most cases, you better keep this value default.

      • faceTrackingPermissionDialogKillProcess

        public boolean faceTrackingPermissionDialogKillProcess
        Whether to kill the process after finishing activities in FaceTrackingHelper.checkPermission(Activity, boolean).

        In case the app has background jobs at the time the face tracking permission dialog is shown, setting this to false should be considered.

      • faceTrackingPreferredFps

        public int faceTrackingPreferredFps
      • platform

        @NonNull
        public PlatformInitArgs platform
        Platform specific initialization arguments.

        Provide either platform.app or platform.activity for CNSDK.

        If none is available at the time CNSDK must be initialized, provide platform.context.

      • faceTrackingServerLogLevel

        public LogLevel faceTrackingServerLogLevel
        Face tracking service log level.

        Unused if face tracking is in-app.

        See Also:
        LeiaSDK#isFaceTrackingInService()
      • resetDisplayConfig

        public boolean resetDisplayConfig
    • Constructor Detail

      • InitArgs

        public InitArgs()