Skip to main content
There is no native Android or iOS SDK for Document Capture yet. Until there is, the recommended way to offer it in a mobile app is to host a small web page that runs the web integration, then open that page in a WebView inside your app.
This is a recommended pattern, not a separate Youverify SDK. Test it on real devices and the OS versions you support before you release.

How it works

1

Host a capture page

Create a page on your own domain that loads the Web SDK and starts Document Capture, as described in Integrate Document Capture on web. It must be served over HTTPS, because browsers only allow camera access on secure pages.
2

Open the page in a WebView

Load that page in a WebView in your app. Enable JavaScript, and allow the page to use the camera.
3

Send the result back to your app

In the SDK’s onSuccess, onFailure and onClose callbacks, pass the outcome to your native code through a message bridge. Then close the WebView.

Recommendations

  • Set hideUsingSecondaryDevice to true in the capture page. Your users are already on a phone, so a secondary device adds a step they don’t need.
  • Keep personal data out of the page URL. Pass anything the page needs, such as the user’s first name, through the bridge or from your own backend.
  • The success result includes base64 document images, which can be large. Consider sending the result from the page straight to your backend, and passing only a success or failure signal to the app.
  • Don’t put your secret API key in the app or in the capture page.

The capture page

This page starts Document Capture on load and reports the outcome through whichever bridge the app provides.

Wrap it in your app

Add the camera permission to AndroidManifest.xml, and request it at runtime before you open the WebView.

Before you release

  • Test camera access, including when the user denies permission and then changes their mind.
  • Test on low-end devices and slow connections. Image capture is the heaviest part of the flow.
  • Handle the failure and close messages, so users who back out are not left on a blank screen.