Android WebView
You can embed the Web Client in a native Android WebView.
Permissions and Settings
Make sure that these required permissions are granted:
android.permission.INTERNET
For remote resources access.
android.permission.CAMERA
For camera capture.
android.permission.READ_EXTERNAL_STORAGE
For upload functionality.
The following settings are required for the native WebView for Android:
- Enable
javaScriptEnabled
Tells the WebView to enable JavaScript execution.
- Allow
allowFileAccess
Enables file access within WebView.
- Allow
allowFileAccessFromFileUrls
Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs.
- Allow
allowUniversalAccessFromFileUrls
Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin.
- Allow
allowContentAccess
Enables content URL access within WebView.
- Allow
javaScriptCanOpenWindowsAutomatically
Tells JavaScript to open windows automatically.
- Enable
domStorageEnabled
Sets whether the DOM storage API is enabled.
- Do not allow
mediaPlaybackRequiresUserGesture
Sets whether the WebView requires a user gesture to play media.
Embedding the Required Script
To allow Jumio to identify the user runtime environment, you will need to embed a required script that sets flag __NVW_WEBVIEW__
to true
to interact with the WebView window object. For details, see the sample code below.
Use of iProov
Be aware that if iProov is included in your workflow it is necessary to extend the WebChromeClient
class to implement a custom view, in order to handle certain iProov full screen requirements.
See WebviewFragment.kt, specifically WebChromeClientFullScreen inner class.
Sample App
Check out our Sample App for the Native Android WebView.