Skip to content

Process Customization

This article outlines the available Face SDK process customization options. Use process customization to configure how the Face SDK records session video, protects screen content, handles vibration, and supports screen orientation.

Session Video Recording

You can configure session video recording in one of the following ways:

  • Record the session and send the video to the server in an additional request. This is the default option. It returns a faster response for the user, but the video can be lost if the application closes before the upload is complete.
  • Record the session and send the video to the server in a Liveness package. This option can increase response time because the server returns the response only after it receives the full package.
  • Disable video recording.

Recording the session and sending the video to the server with an additional request:

let configuration = LivenessConfiguration {
    $0.recordingProcess = .asynchronousUpload
}

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration) { response in

}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.recordingProcess = RFSRecordingProcessAsynchronousUpload;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration = LivenessConfiguration.Builder()
    .setRecordingProcess(RecordingProcess.ASYNCHRONOUS_UPLOAD)
    .build()
FaceSDK.Instance().startLiveness(
    context,
    configuration
) { response -> }
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setRecordingProcess(RecordingProcess.ASYNCHRONOUS_UPLOAD)
    .build();
FaceSDK.Instance().startLiveness(context,
    configuration,
    response -> {

        });
var livenessResponse = await FaceSDK.instance.startLiveness(
  config: LivenessConfig(
    recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD,
  ),
);
var livenessResponse = await FaceSDK.instance.startLiveness({
  config: new LivenessConfig({
    recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD,
  }),
})
// Android
LivenessConfiguration.Builder config = new();
config.SetRecordingProcess(RecordingProcess.AsynchronousUpload);
FaceSDK.Instance().StartLiveness(Platform.AppContext, config.Build(), this);

// iOS
RFSFaceSDK.Service.StartLivenessFrom(CurrentPresenter, true, RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) =>
{
    builder.RecordingProcess = RFSRecordingProcess.AsynchronousUpload;
}), (RFSLivenessResponse response) =>
{
}, () => { });
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD
}, (response) => { }, _ => { })
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD
}, function (m) { }, function (e) { })
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.ASYNCHRONOUS_UPLOAD
})

Recording the session and sending the video to the server with a Liveness package:

let configuration = LivenessConfiguration {
    $0.recordingProcess = .synchronousUpload
}

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration) { response in

}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.recordingProcess = RFSRecordingProcessSynchronousUpload;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration = LivenessConfiguration.Builder()
    .setRecordingProcess(RecordingProcess.SYNCHRONOUS_UPLOAD)
    .build()
FaceSDK.Instance().startLiveness(
    context,
    configuration
) { response -> }
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setRecordingProcess(RecordingProcess.SYNCHRONOUS_UPLOAD)
    .build();
FaceSDK.Instance().startLiveness(context,
    configuration,
    response -> {

        });
var livenessResponse = await FaceSDK.instance.startLiveness(
  config: LivenessConfig(
    recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD,
  ),
);
var livenessResponse = await FaceSDK.instance.startLiveness({
  config: new LivenessConfig({
    recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD,
  }),
})
// Android
LivenessConfiguration.Builder config = new();
config.SetRecordingProcess(RecordingProcess.SynchronousUpload);
FaceSDK.Instance().StartLiveness(Platform.AppContext, config.Build(), this);

// iOS
RFSFaceSDK.Service.StartLivenessFrom(CurrentPresenter, true, RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) =>
{
    builder.RecordingProcess = RFSRecordingProcess.SynchronousUpload;
}), (RFSLivenessResponse response) =>
{
}, () => { });
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD
}, (response) => { }, _ => { })
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD
}, function (m) { }, function (e) { })
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.SYNCHRONOUS_UPLOAD
})

Disabling the session recording:

let configuration = LivenessConfiguration {
    $0.recordingProcess = .notUpload
}

FaceSDK.service.startLiveness(from: viewController, 
    animated: true,  
    configuration: configuration) { response in

}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.recordingProcess = RFSRecordingProcessNotUpload;
  }];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration = LivenessConfiguration.Builder()
    .setRecordingProcess(RecordingProcess.NOT_UPLOAD)
    .build()
FaceSDK.Instance().startLiveness(
    context,
    configuration
) { response -> }
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setRecordingProcess(RecordingProcess.NOT_UPLOAD)
    .build();
FaceSDK.Instance().startLiveness(context,
    configuration,
    response -> {

        });
var livenessResponse = await FaceSDK.instance.startLiveness(
  config: LivenessConfig(
    recordingProcess: RecordingProcess.NOT_UPLOAD,
  ),
);
var livenessResponse = await FaceSDK.instance.startLiveness({
  config: new LivenessConfig({
    recordingProcess: RecordingProcess.NOT_UPLOAD,
  }),
})
// Android
LivenessConfiguration.Builder config = new();
config.SetRecordingProcess(RecordingProcess.NotUpload);
FaceSDK.Instance().StartLiveness(Platform.AppContext, config.Build(), this);

// iOS
RFSFaceSDK.Service.StartLivenessFrom(CurrentPresenter, true, RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) =>
{
    builder.RecordingProcess = RFSRecordingProcess.NotUpload;
}), (RFSLivenessResponse response) =>
{
}, () => { });
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.NOT_UPLOAD
}, (response) => { }, _ => { })
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.NOT_UPLOAD
}, function (m) { }, function (e) { })
FaceSDK.startLiveness({
  recordingProcess: RecordingProcess.NOT_UPLOAD
})

Preventing Screen Capture

To protect sensitive biometric data and meet security and compliance requirements, the Face SDK can restrict screenshots and screen recording while the SDK UI is displayed.

Depending on the platform, captured content may be blocked entirely or replaced with a black screen.

To enable screen capture protection, use the following code blocks.

Capture

val configuration = FaceCaptureConfiguration.Builder()
    .setPreventScreenRecording(true)
    .build()

FaceSDK.Instance().presentFaceCaptureActivity(
    context,
    configuration,
    LivenessCallback { response: LivenessResponse? -> })
FaceCaptureConfiguration configuration =  new FaceCaptureConfiguration.Builder()
        .setPreventScreenRecording(true)
        .build();

FaceSDK.Instance().presentFaceCaptureActivity(context, configuration, response -> {
});
let configuration = FaceCaptureConfiguration {
    $0.isPreventScreenRecordingEnable = true
}

FaceSDK.service.presentFaceCaptureViewController(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
} completion: {
    // handle completion
}
RFSFaceCaptureConfiguration *configuration = [RFSFaceCaptureConfiguration configurationWithBuilder:^(RFSFaceCaptureConfigurationBuilder *builder) {
    builder.preventScreenRecording = YES;
}];

[RFSFaceSDK.service presentFaceCaptureViewControllerFrom:self.viewController
    animated:YES
    configuration:configuration
    onCapture:^(RFSFaceCaptureResponse *response) {
    // handle response
} completion:^{
    // handle completion
}];

Liveness

val configuration = LivenessConfiguration.Builder()
    .setPreventScreenRecording(true)
    .build()

FaceSDK.Instance().startLiveness(
    context,
    configuration,
    LivenessCallback { response: LivenessResponse? -> })
LivenessConfiguration configuration =  new LivenessConfiguration.Builder()
        .setPreventScreenRecording(true)
        .build();

FaceSDK.Instance().startLiveness(context, configuration, response -> {
});
let configuration = LivenessConfiguration {
    $0.isPreventScreenRecordingEnable = true
}

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.preventScreenRecording = YES;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {
    // handle response
} completion:^{
    // handle completion
}];

Disabling Vibration

For the Liveness and Capture features, vibration is enabled by default after each correct action:

  • When the user aligns their face for a selfie and the system captures a frame.
  • When the user turns their head to the required segment and the system captures a frame.

To disable vibration, use the following code blocks.

Capture

let configuration = FaceCaptureConfiguration {
    $0.vibrateOnSteps = false
}
FaceSDK.service.presentFaceCaptureViewController(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
} completion: {
    // handle completion
}
RFSFaceCaptureConfiguration *configuration = [RFSFaceCaptureConfiguration configurationWithBuilder:^(RFSFaceCaptureConfigurationBuilder *builder) {
    builder.vibrateOnSteps = NO;
}];

[RFSFaceSDK.service presentFaceCaptureViewControllerFrom:self.viewController
    animated:YES 
    configuration:configuration
    onCapture:^(RFSFaceCaptureResponse *response) {

} completion:^{

}];
val configuration: FaceCaptureConfiguration = FaceCaptureConfiguration.Builder()
    .setVibrateOnStep(false)
    .build()
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .setVibrateOnStep(false)
    .build();
var config = FaceCaptureConfig(
  vibrateOnSteps: false,
);
var config = new FaceCaptureConfig({
  vibrateOnSteps: false,
})
// Android
FaceCaptureConfiguration.Builder config = new();
config.SetVibrateOnStep(false);
FaceSDK.Instance().PresentFaceCaptureActivity(Platform.AppContext, config.Build(), this);

// iOS
RFSFaceSDK.Service.PresentFaceCaptureViewControllerFrom(CurrentPresenter, true, RFSFaceCaptureConfiguration.ConfigurationWithBuilder((RFSFaceCaptureConfigurationBuilder builder) =>
{
    builder.VibrateOnSteps = false;
}), (RFSFaceCaptureResponse captureResponse) =>
{
}, null);
FaceSDK.startFaceCapture({
  vibrateOnSteps: false
}, _ => { }, _ => { })
FaceSDK.startFaceCapture({
  vibrateOnSteps: false
}, function (m) { }, function (e) { })
FaceSDK.startFaceCapture({
  vibrateOnSteps: false
})

Liveness

let configuration = LivenessConfiguration {
    $0.vibrateOnSteps = false
    }

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration1) { response in
    // handle response
    }
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.vibrateOnSteps = NO;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration: LivenessConfiguration = LivenessConfiguration.Builder()
    .setVibrateOnStep(false)
    .build()
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setVibrateOnStep(false)
    .build();
var config = LivenessConfig(
  vibrateOnSteps: false,
);
var config = new LivenessConfig({
  vibrateOnSteps: false,
})
// Android
LivenessConfiguration.Builder config = new();
config.SetVibrateOnStep(false);
FaceSDK.Instance().StartLiveness(Platform.AppContext, config.Build(), this);

// iOS
RFSFaceSDK.Service.StartLivenessFrom(CurrentPresenter, true, RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) =>
{
    builder.VibrateOnSteps = false;
}), (RFSLivenessResponse response) =>
{
}, () => { });
FaceSDK.startLiveness({
  vibrateOnSteps: false
}, _ => { }, _ => { })
FaceSDK.startLiveness({
  vibrateOnSteps: false
}, function (m) { }, function (e) { })
FaceSDK.startLiveness({
  vibrateOnSteps: false
})

Configuring Device Orientation

When your application runs on a tablet, the device can be in landscape orientation. In such cases, enable the appropriate interface orientation so the UI displays correctly.

Warning

On iPad, orientation-restricting logic that uses supportedInterfaceOrientations does not work in multitasking mode because the system does not call this method.

To make the system call supportedInterfaceOrientations, select Requires full screen in Target settings. For more information, see iOS developer documentation.

There are three screen orientation options available:

  • The Landscape option fixes the interface in horizontal mode regardless of device rotation.
  • The Portrait option keeps the screen in a vertical layout.
  • The Portrait and landscape option allows the screen to rotate based on how the user holds the device.

Capture

  • Portrait
let configuration = FaceCaptureConfiguration {
    $0.screenOrientation = [.portrait]
}
FaceSDK.service.presentFaceCaptureViewController(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
} completion: {
    // handle completion
}
RFSFaceCaptureConfiguration *configuration = [RFSFaceCaptureConfiguration configurationWithBuilder:^(RFSFaceCaptureConfigurationBuilder *builder) {
    builder.screenOrientation = RFSScreenOrientationPortrait;
}];

[RFSFaceSDK.service presentFaceCaptureViewControllerFrom:viewController
    animated:YES
    configuration:configuration
    onCapture:^(RFSFaceCaptureResponse *response) {

} completion:^{

}];
val configuration: FaceCaptureConfiguration = FaceCaptureConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT)
    .build()
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT)
    .build();
var config = new FaceCaptureConfig(
  screenOrientation: [ScreenOrientation.PORTRAIT],
);
var config = new FaceCaptureConfig({
  screenOrientation: [ScreenOrientation.PORTRAIT],
});
// Android
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .SetScreenOrientation(ScreenOrientation.Portrait)
    .Build();

// iOS
RFSFaceCaptureConfiguration.ConfigurationWithBuilder((RFSFaceCaptureConfigurationBuilder builder) => {
    builder.ScreenOrientation = RFSScreenOrientation.Portrait;
});
var config = new FaceCaptureConfig()
config.screenOrientation = [Enum.ScreenOrientation.PORTRAIT]
var config = new FaceCaptureConfig()
config.screenOrientation = [Enum.ScreenOrientation.PORTRAIT]
var config = new FaceCaptureConfig()
config.screenOrientation = [Enum.ScreenOrientation.PORTRAIT]
  • Landscape
let configuration = FaceCaptureConfiguration {
    $0.screenOrientation = [.landscape]
}
FaceSDK.service.presentFaceCaptureViewController(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
} completion: {
    // handle completion
}
RFSFaceCaptureConfiguration *configuration = [RFSFaceCaptureConfiguration configurationWithBuilder:^(RFSFaceCaptureConfigurationBuilder *builder) {
    builder.screenOrientation = RFSScreenOrientationLandscape;
}];

[RFSFaceSDK.service presentFaceCaptureViewControllerFrom:viewController
                                                animated:YES
                                        configuration:configuration
                                            onCapture:^(RFSFaceCaptureResponse *response) {

} completion:^{

}];
val configuration: FaceCaptureConfiguration = FaceCaptureConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.LANDSCAPE)
    .build()
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.LANDSCAPE)
    .build();
var config = new FaceCaptureConfig(
  screenOrientation: [ScreenOrientation.LANDSCAPE],
);
var config = new FaceCaptureConfig({
  screenOrientation: [ScreenOrientation.LANDSCAPE],
});
// Android
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .SetScreenOrientation(ScreenOrientation.Landscape)
    .Build();

// iOS
RFSFaceCaptureConfiguration.ConfigurationWithBuilder((RFSFaceCaptureConfigurationBuilder builder) => {
    builder.ScreenOrientation = RFSScreenOrientation.Landscape;
});
var config = new FaceCaptureConfig()
config.screenOrientation = [Enum.ScreenOrientation.LANDSCAPE]
var config = new FaceCaptureConfig()
config.screenOrientation = [Enum.ScreenOrientation.LANDSCAPE]
var config = new FaceCaptureConfig()
config.screenOrientation = [Enum.ScreenOrientation.LANDSCAPE]
  • Portrait and landscape
let configuration = FaceCaptureConfiguration {
    $0.screenOrientation = [.portrait, .landscape]
}
FaceSDK.service.presentFaceCaptureViewController(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
} completion: {
    // handle completion
}
RFSFaceCaptureConfiguration *configuration = [RFSFaceCaptureConfiguration configurationWithBuilder:^(RFSFaceCaptureConfigurationBuilder *builder) {
    builder.screenOrientation = RFSScreenOrientationPortrait | RFSScreenOrientationLandscape;
}];

[RFSFaceSDK.service presentFaceCaptureViewControllerFrom:viewController
    animated:YES
    configuration:configuration
    onCapture:^(RFSFaceCaptureResponse *response) {

} completion:^{

}];
val configuration: FaceCaptureConfiguration = FaceCaptureConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT, ScreenOrientation.LANDSCAPE)
    .build()
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT, ScreenOrientation.LANDSCAPE)
    .build();
var config = new FaceCaptureConfig(
  screenOrientation: [
    ScreenOrientation.PORTRAIT,
    ScreenOrientation.LANDSCAPE
  ],
);
var config = new FaceCaptureConfig({
  screenOrientation: [
    ScreenOrientation.PORTRAIT,
    ScreenOrientation.LANDSCAPE
  ],
})
// Android
FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
    .SetScreenOrientation(ScreenOrientation.Portrait, ScreenOrientation.Landscape)
    .Build();

// iOS
RFSFaceCaptureConfiguration.ConfigurationWithBuilder((RFSFaceCaptureConfigurationBuilder builder) => {
    builder.ScreenOrientation = RFSScreenOrientation.Portrait | RFSScreenOrientation.Landscape;
});
var config = new FaceCaptureConfig()
config.screenOrientation = [
  Enum.ScreenOrientation.PORTRAIT,
  Enum.ScreenOrientation.LANDSCAPE
]
var config = new FaceCaptureConfig()
config.screenOrientation = [
  Enum.ScreenOrientation.PORTRAIT,
  Enum.ScreenOrientation.LANDSCAPE
]
var config = new FaceCaptureConfig()
config.screenOrientation = [
  Enum.ScreenOrientation.PORTRAIT,
  Enum.ScreenOrientation.LANDSCAPE
]

Liveness

  • Portrait
let configuration = LivenessConfiguration {
    $0.screenOrientation = [.portrait]
}

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.screenOrientation = RFSScreenOrientationPortrait;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration: LivenessConfiguration = LivenessConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT)
    .build()
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT)
    .build();
var config = new LivenessConfig(
  screenOrientation: [ScreenOrientation.PORTRAIT],
);
var config = new LivenessConfig({
  screenOrientation: [ScreenOrientation.PORTRAIT],
});
// Android
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .SetScreenOrientation(ScreenOrientation.Portrait)
    .Build();

// iOS
RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) => {
    builder.ScreenOrientation = RFSScreenOrientation.Portrait;
});
var config = new LivenessConfig()
config.screenOrientation = [ScreenOrientation.PORTRAIT]
var config = new LivenessConfig()
config.screenOrientation = [ScreenOrientation.PORTRAIT]
var config = new LivenessConfig()
config.screenOrientation = [ScreenOrientation.PORTRAIT]
  • Landscape
let configuration = LivenessConfiguration {
    $0.screenOrientation = [.landscape]
}

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.screenOrientation = RFSScreenOrientationLandscape;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration: LivenessConfiguration = LivenessConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.LANDSCAPE)
    .build()
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.LANDSCAPE)
    .build();
var config = new LivenessConfig(
  screenOrientation: [ScreenOrientation.LANDSCAPE],
);
var config = new LivenessConfig({
  screenOrientation: [ScreenOrientation.LANDSCAPE],
});
// Android
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .SetScreenOrientation(ScreenOrientation.Landscape)
    .Build();

// iOS
RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) => {
    builder.ScreenOrientation = RFSScreenOrientation.Landscape;
});
var config = new LivenessConfig()
config.screenOrientation = [ScreenOrientation.LANDSCAPE]
var config = new LivenessConfig()
config.screenOrientation = [ScreenOrientation.LANDSCAPE]
var config = new LivenessConfig()
config.screenOrientation = [ScreenOrientation.LANDSCAPE]
  • Portrait and landscape
let configuration = LivenessConfiguration {
    $0.screenOrientation = [.portrait, .landscape]
}

FaceSDK.service.startLiveness(from: viewController,
    animated: true,
    configuration: configuration) { response in
    // handle response
}
RFSLivenessConfiguration *configuration = [RFSLivenessConfiguration configurationWithBuilder:^(RFSLivenessConfigurationBuilder * _Nonnull builder) {
    builder.screenOrientation = RFSScreenOrientationPortrait | RFSScreenOrientationLandscape;
}];

[RFSFaceSDK.service startLivenessFrom:viewController
    animated:YES
    configuration:configuration
    onLiveness:^(RFSLivenessResponse * _Nonnull response) {

} completion:^{

}];
val configuration: LivenessConfiguration = LivenessConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT, ScreenOrientation.LANDSCAPE)
    .build()
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .setScreenOrientation(ScreenOrientation.PORTRAIT, ScreenOrientation.LANDSCAPE)
    .build();
var config = new LivenessConfig(
  screenOrientation: [
    ScreenOrientation.PORTRAIT,
    ScreenOrientation.LANDSCAPE
  ],
);
var config = new LivenessConfig({
  screenOrientation: [
    ScreenOrientation.PORTRAIT,
    ScreenOrientation.LANDSCAPE
  ],
})
// Android
LivenessConfiguration configuration = new LivenessConfiguration.Builder()
    .SetScreenOrientation(ScreenOrientation.Portrait, ScreenOrientation.Landscape)
    .Build();

// iOS
RFSLivenessConfiguration.ConfigurationWithBuilder((RFSLivenessConfigurationBuilder builder) => {
    builder.ScreenOrientation = RFSScreenOrientation.Portrait | RFSScreenOrientation.Landscape;
});
var config = new LivenessConfig()
config.screenOrientation = [
  ScreenOrientation.PORTRAIT,
  ScreenOrientation.LANDSCAPE
]
var config = new LivenessConfig()
config.screenOrientation = [
  ScreenOrientation.PORTRAIT,
  ScreenOrientation.LANDSCAPE
]
var config = new LivenessConfig()
config.screenOrientation = [
  ScreenOrientation.PORTRAIT,
  ScreenOrientation.LANDSCAPE
]