Skip to content

Customization Using Fragment

By default, the Face SDK provides an ability to inherit from FaceDefaultUiFragment or FaceUiFragment. Any child class must be registered in Configuration using the registerUiFragmentClass method.

For example:

Liveness

LivenessConfiguration configuration = new LivenessConfiguration.Builder()
                .registerUiFragmentClass(BasicCustomUiFragment.class)  // BasicCustomUiFragment - custom fragment
                .build();
FaceSDK.Instance().startLiveness(context, configuration, livenessResponse -> {});

Face Capture

FaceCaptureConfiguration configuration = new FaceCaptureConfiguration.Builder()
                .registerUiFragmentClass(BasicCustomUiFragment.class)  // BasicCustomUiFragment - custom fragment
                .build();
FaceSDK.Instance().presentFaceCaptureActivity(context, configuration, faceCaptureResponse -> { });