Skip to content

Frequently Asked Questions

richardsimongreen edited this page Apr 3, 2023 · 35 revisions

How to I update to the new pinned certificate?

Please look at this page about updating for use past Dec 2023

When do camera permissions expire?

As of Android 11, apps will find their runtime permissions expiring, requiring the user to allow them again. This is not a problem because iProov checks for permissions on every scan and follows the correct procedure to request access.

Issues with okhttp3 Dependency

SDK v6.2.1 and below

IProov Android SDK depends indirectly on okhttp 3.8.1. All reported implementation issues related to okhttp at the time of writing this note, have been due to the use of okhttp 4.x. Therefore, using okhttp 3.x is generally the solution.

This can be achieved by downgrading the dependency that provides 4.x, by excluding okhttp package from that dependency or by a combination of both of these.

Please note that a 3.x version is not necessarily older than 4.x one.

We also recommend that you check the actual dependency tree, as gradle can potentially resolve dependencies differently to what you might assume.

If you still have issues while using okhttp 3.x:

with minSDK 21+

You might encounter a bug in Android 11 with error "Expected Android API level 21+ but was 29". It seems that okhttp versions lower than 3.13.0 are not affected by this bug, so if you find this error then you have a dependency that is probably forcing an affected version of okhttp. If that's the case you should use okhttp 3.14.7, as the bug was fixed in that version, or later.

with minSDK 19

Generally you should not find any issue if this is the case. If still you have an issue in this scenario, then it is likely that you have a dependency that is forcing a version of okhttp higher than 3.12.12. Nevertheless, if that's the case you will have minSDK 21 instead and your app would crash in API 19. Everything should work as expected once you fix it to be a truly minSDK 19 app.

SDK v6.3.0 and above

v6.3.0 has an updated direct dependency and that brings our indirect dependency of okhttp3 up to 3.12.12 by default.

What is the size impact of the Android SDK?

We know that SDK size impact is an important factor, and we continue to do everything we can to pack iProov's advanced technologies into as small a payload as possible. We get asked this question quite a bit, and it's a hard one to answer.

In addition, app downloads from Google Play are compressed, which further reduces the SDK size impact.

Since the size impact of the iProov SDK depends heavily upon the configuration of your existing app, it is impossible to provide an accurate determination of size impact across all possible scenarios.

However, to provide a rough estimate, we followed the following procedure:

A. Produce a basic app and generate an APK.

B. Modify the same app to with the iProov SDK included, and generate an new APK

Installing each time onto the same device and reading the "app info" we can determine the size impacts.

The following are approximate increases in app sizes when selecting each face detector and including only their required aar library dependencies. This test was done on v7.0.3.

Face detector AARs added App size increase
Classic iproov 700 KB
Blazeface iproov + iproov-blazeface 3.7 MB
MLKit iproov + iproov-mlkit 21.3 MB

Why is the camera preview so slow?

On some very low-end devices, the system performance is insufficient to provide a smooth iProov experience. We are always looking at optimizing the Android SDK experience on low-end devices.

You should also ensure you are not running the SDK with the Android Studio debugger attached as this has a significant performance impact. You should also check the Known Issues page

Does the SDK support AndroidX?

iProov Android SDK 6.0+ uses AndroidX, therefore you must use AndroidX.

If you are still using Android Support Libraries, you must continue to use iProov Android SDK 5.x (no longer supported). We would encourage you to move to AndroidX as soon as possible.

What is option.ui.activityCompatibilityRequestCode?

This option was introduced in SDK v5.2.3, and removed in 8.0.0.

Sometimes this error is erroneously triggered in pre 8.x versions for other reasons that are fixed in 8.x+.

For most cases, leave this value as null (default).

In some cases, you might want the iProov Activity to be started using startActivityForResult() instead of startActivity(). Typically, this is because your Activity has launchMode="singleInstance" set in the manifest, due to a strange side-effect of how singleInstance Activities are handled in Android. Note: This is strongly discouraged by both Google and iProov!

If you must use singleInstance for whatever reason, then ensure that you pass your calling Activity as the context to IProov.launch() and set a value for options.ui.activityCompatibilityRequestCode, which will be the requestCode for the result. This allows you to identify (and ignore) the result from iProov (which is always zero) in onActivityResult() if you have already implemented it.

Clone this wiki locally