Selfie Capture captures the user’s self image (selfie) for facial verification or any other purposes after verifying the user’s physical presence in front of the device camera.

The capture flow supports verification for two pairs of expressions:

Using SelfieCaptureDialogFragment

Base Activity must be a fragment activity because this is a support-based Fragment (androidx.fragment.app.Fragment).

public class YourActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.your_activity_layout);

        SelfieCaptureDialogFragment.start(YourActivity.this, new SelfieCaptureListener() {
            @Override
            public void onComplete(@NonNull Bundle bundle) {
                Selfie selfie = LFVBundle.getResultSelfie(bundle);
                //Use selfie here
            }

            @Override
            public void onCancelled() {

            }
        });
    }
}

Configurable UI components

To modify the color scheme, font sizes, and other assets in the fragment or activity, you can override the following resources in the app.

dimens

colors

drawable