Companion

public class Companion

Properties

Link copied to clipboard
public final static UIHelper.Companion INSTANCE
Link copied to clipboard

Whether capture does not match dialog is already showing

Link copied to clipboard

Whether a confirmation dialog is already showing

Link copied to clipboard

Whether an info dialog is already showing

Link copied to clipboard

Whether a liveness retry dialog is already showing

Link copied to clipboard

Whether a loading dialog is already showing

Link copied to clipboard

Whether a move gently dialog is already showing

Link copied to clipboard

Whether a snackbar is already showing

Link copied to clipboard

Whether a time out dialog is already showing

Link copied to clipboard
private final Object lock

The lock object to synchronize access to the above variables

Functions

Link copied to clipboard
public final Integer dpToPx(Activity activity, Float dp)

A utility method to convert dp to pixels

Link copied to clipboard
public final String getInstructionText(Activity activity, Object id)

Gets the text for a particular resource ID

Link copied to clipboard
private final Object getLock()

The lock object to synchronize access to the above variables

Link copied to clipboard
public final Boolean isCameraPermissionGranted(Activity activity)

This method is used to check if the camera permission is granted.

Link copied to clipboard

Whether capture does not match dialog is already showing

Link copied to clipboard

Whether a confirmation dialog is already showing

Link copied to clipboard
public final Boolean isDialogShowing()

Determines if any dialog is showing

Link copied to clipboard
private final Boolean isInfoDialogShowing()

Whether an info dialog is already showing

Link copied to clipboard

Whether a liveness retry dialog is already showing

Link copied to clipboard

Whether a loading dialog is already showing

Link copied to clipboard

Whether a move gently dialog is already showing

Link copied to clipboard
private final Boolean isSnackbarShowing()

Whether a snackbar is already showing

Link copied to clipboard

Whether a time out dialog is already showing

Link copied to clipboard
public final Unit processRecoverableError(Activity activity, ErrorDetails recoverableError, Function0<Unit> positiveListener, Function0<Unit> negativeListener)

Show a recoverable error dialog with a message based on the error details

Link copied to clipboard
public final Unit processUnrecoverableError(Activity activity, ErrorDetails unRecoverableError, Function0<Unit> onClose)

Show an unrecoverable error dialog with a message based on the error details

Link copied to clipboard
public final Unit requestCameraPermission(Activity activity, View viewCamera)

This method is used to request for camera permission.

Link copied to clipboard
private final Unit setCaptureSessionErrorDialogShowing(Boolean isCaptureSessionErrorDialogShowing)

Whether capture does not match dialog is already showing

Link copied to clipboard
private final Unit setConfirmationDialogShowing(Boolean isConfirmationDialogShowing)

Whether a confirmation dialog is already showing

Link copied to clipboard
private final Unit setInfoDialogShowing(Boolean isInfoDialogShowing)

Whether an info dialog is already showing

Link copied to clipboard
private final Unit setLivenessRetryDialogShowing(Boolean isLivenessRetryDialogShowing)

Whether a liveness retry dialog is already showing

Link copied to clipboard
private final Unit setLoadingDialogShowing(Boolean isLoadingDialogShowing)

Whether a loading dialog is already showing

Link copied to clipboard
private final Unit setMoveGentlyDialogShowing(Boolean isMoveGentlyDialogShowing)

Whether a move gently dialog is already showing

Link copied to clipboard
private final Unit setSnackbarShowing(Boolean isSnackbarShowing)

Whether a snackbar is already showing

Link copied to clipboard
private final Unit setTimeOutDialogShowing(Boolean isTimeOutDialogShowing)

Whether a time out dialog is already showing

Link copied to clipboard
public final Unit showCaptureSessionErrorDialog(Activity activity, Integer titleResId, Function0<Unit> onClose)

Show a face scan retry info dialog

Link copied to clipboard
public final Unit showConfirmationDialog(Activity activity, Integer titleText, Integer messageText, Integer positiveButtonText, Integer negativeButtonText, Function0<Unit> positiveListener, Function0<Unit> negativeListener)

Show a confirmation dialog

Link copied to clipboard
public final Unit showFaceScanRetryDialog(Activity activity, Function0<Unit> onClose)

Show a face scan retry info dialog

Link copied to clipboard
public final Unit showInfoDialog(Activity activity, Integer titleResId, Integer messageResId, Function0<Unit> onClose)

Show an info dialog

Link copied to clipboard
public final Unit showLoadingDialog(Activity activity, Integer textResId, Function0<Unit> inThreadLambda, Function0<Unit> postDismissLambda)

Show a loading dialog while a lambda is running in a thread

Link copied to clipboard
public final Unit showMoveGentlyDialog(Activity activity, Function0<Unit> onClose)

Show a move gently dialog

Link copied to clipboard
public final Unit showSnackBar(Activity activity, View view, Integer textId, Integer colorId, Integer delayMs, Float marginDp)

A utility method that shows a snackbar with a message.

Link copied to clipboard
public final Unit showSuccessDialog(Integer imageResourceId, Activity activity, Integer titleResId, Integer messageResId, Function0<Unit> onClose)

Shows a success dialog with an image and a message

Link copied to clipboard
public final Unit showTimeOutDialog(Activity activity, Function0<Unit> onClose)

Show a time out dialog

Link copied to clipboard
public final Bitmap vectorDrawableToBitmap(Context context, Integer drawable)

Convert a drawable resource to a bitmap