BiometridStandard.getInstance()
.startAuthentication(activity, processCallback);
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().initialize(
BIOMETRID_API_SERVER_URL ,
BIOMETRID_APP,
BIOMETRID_CREDENTIAL,
Language.English,
this);
}
@Override
public void initializationCallback(boolean status, @Nullable Errors errors) {
if(status) startAuthentication();
}
public void startAuthentication() {
BiometridStandard.getInstance().startCamera(this, new ProcessCallback() {
@Override
public void authenticationCallback(@Nullable Boolean status, @Nullable Errors errors) {
if (errors != null) {
Log.e(TAG, "authenticationCallback -> error: " + errors.getMessage());
} else {
Log.d(TAG, "authenticationCallback -> status: " + status);
}
});
}
}