Photo Capture
Perform the capture of a photo and encode in base64. Prevents capturing blurred images.
BiometridStandard.getInstance().startCamera(processCallback, options);
ProcessCallback processCallback
Callback where result information is received.
CameraOptions? options
Camera 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) startCamera();
}
public void startCamera() {
BiometridStandard.getInstance().startCamera(new ProcessCallback() {
@Override
public void cameraCallback(@Nullable String image64, @Nullable Errors errors) {
if (errors != null) {
Log.e(TAG, "cameraCallback -> error: " + errors.getMessage());
} else {
Log.d(TAG, "cameraCallback -> base64 image: " + image64);
}
}, new CameraOptions());
}
}
Callback params
Parameter
Description
String? image64
Captured document photo encoded in Base64
Errors? errors
Detected errors
Was this helpful?