Auto Capture
Automatically capture identification document, MRZ code's and face.
// Start automatic capture (Document or Face)
BiometridStandard.getInstance().startAutoCapture(processCallback, options);
// Start mrz code scanner
BiometridStandard.getInstance().startMRZCapture(processCallback, options);ProcessCallback processCallback
Callback where result information is received.
CaptureOptions? options
AutoCaptureSDK configurations
Implementation Example
class ExampleActivity extends AppCompatActivity implements InitializationCallback{
    String TAG = getClass().getSimpleName();
    String BIOMETRID_API_SERVER_URL = "your server URL";
    String BIOMETRID_APP = "your app";
    String BIOMETRID_CREDENTIAL = "your credential";
    
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        BiometridStandard.getInstance().init(
                BIOMETRID_API_SERVER_URL ,
                BIOMETRID_APP,
                BIOMETRID_ONBIOMETRID_CREDENTIAL,
                Language.English,    
                this);
    }
    
    @Override
    public void initializationCallback(boolean status, @Nullable Errors errors) {
        if(status) startAutoCapture();
    }
    
    public void startAutoCapture() {
        BiometridStandard.getInstance().startAutoCapture(processCallback, new CaptureOptions());
    }
    
     public void startFaceCapture() {
        BiometridStandard.getInstance().startAutoCapture(processCallback, new CaptureOptions(type = CaptureType.Face));
    }
    
    public void startMRZReader() {
        BiometridStandard.getInstance().startMRZCapture(processCallback, new CaptureOptions());
    }
    
    private ProcessCallback processCallback = new ProcessCallback() {
        @Override
        public void documentCaptureCallback(@Nullable String image64, mrz: MrzData?, @Nullable Errors errors) {
            if (errors != null) {
                Log.e(TAG, "documentCapture -> error: " + errors.getMessage());
            } else {
                if(mrz != null)  Log.d(TAG, "mrzCapture -> MRZData: " + mrz.toString());
                else Log.d(TAG, "documentCapture -> base64 image: " + image64);
            }
    };
}Callback params
Parameter
Description
String? image64
Captured document photo encoded in Base64
MrzData? mrz
Captured information from MRZ Code
Errors? errors
Detected errors
Was this helpful?
