Class LeiaSDK.InitArgs
- java.lang.Object
-
- com.leia.sdk.LeiaSDK.InitArgs
-
- Enclosing class:
- LeiaSDK
public static class LeiaSDK.InitArgs extends Object
Initialization arguments forLeiaSDK.createSDK(InitArgs).
-
-
Field Summary
Fields Modifier and Type Field Description LeiaSDK.DelegatedelegateOptional delegate.booleanenableFaceTrackingWhether to initialize face tracking ASAP or not.booleanenableValidationWhether to do runtime validation or not.booleanfaceTrackingPermissionDialogKillProcessWhether to kill the process after finishing activities inFaceTrackingHelper.checkPermission(Activity, boolean).intfaceTrackingPreferredFpsFaceTrackingRuntimefaceTrackingRuntimeInitial face tracking runtime.LogLevelfaceTrackingServerLogLevelFace tracking service log level.StringlicenseKeyCNSDK requires a valid license key.PlatformInitArgsplatformPlatform specific initialization arguments.booleanrequiresFaceTrackingPermissionCheckWhether to require face tracking permission to be granted.booleanresetDisplayConfigbooleanstartFaceTrackingWhether to start face tracking right after initialization or not.booleanuseSharedCameraSinkWhether to use theSharedCameraSinkor not.
-
Constructor Summary
Constructors Constructor Description InitArgs()
-
-
-
Field Detail
-
delegate
@Nullable public LeiaSDK.Delegate delegate
Optional delegate.
-
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 theSharedCameraSinkor 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)afterLeiaSDK.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 inFaceTrackingHelper.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
-
-