Configuration
Initialisation options
Set the options on a MobbScanConfiguration and pass it to initSdk:
const configuration = new MobbScanConfiguration();
configuration.isCancellationDialogEnabled = true;
configuration.isLightMode = true;
MobbScanAPI.initSdk(configuration, onSuccess, onError);
| Option | Default | Description |
|---|---|---|
isCancellationDialogEnabled | true | Asks the user for confirmation before leaving a capture with the back button |
isLightMode | false | Uses ambient light with the front camera during face capture. |
Environment
Set the URL of your MobbScan environment after initSdk:
MobbScanAPI.setBaseURL('https://{SERVER-URL}', onSuccess, onError);
Callbacks
Every method takes a success and an error callback. The error callback receives an IMobbScanError with errorCode and errorDetails. See Error handling.