Skip to main content

captureImage()

Captures images of ID-1 sized cards (e.g. credit cards, driver's licenses, health insurance cards) when using Aila's Interactive Kiosk equipped with the ID Tray accessory.

If capture succeeds, the captured image is returned via the imageCaptured event. If capture fails, possible causes include:

  • Unable to achieve correct camera focus
  • Unable to achieve correct exposure (Note: the Aila Interactive Kiosk supplies enough light to operate without ambient lighting, but if the hardware is unpowered, or lighting levels have been overridden, low exposure may occur)
AilaCordovaPlugin.captureImage()

Returns

Promise that resolves when capture is initiated. Listen for the imageCaptured event to get the result.

Example

window.addEventListener('imageCaptured', (event) => {
if (event.success) {
console.log('Image captured');
displayImage(event.image);
} else {
console.error('Capture failed:', event.error);
}
});

AilaCordovaPlugin.captureImage();