-
Notifications
You must be signed in to change notification settings - Fork 5
Frequently Asked Questions
For most cases, leave this value as null
.
In some cases, you might want the IProov Activity to be started using startActivityForResult()
instead of startActivity()
. To achieve this, ensure that you pass your calling Activity as context to IProov.launch()
and set some short
value for 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. A result here from IProov means nothing, it is just a side-effect.
This peculiar option fixes an unusual bug in Android when the calling Activity has launchMode="singleInstance"
. If a Single Instance Activity starts another Activity then that Activity will be in a new Task by itself. Surprisingly, back
and finish()
will return you to the Single Instance Activity EXCEPT if the task switcher (square button) has been activated (even if the same task is immediately reselected) in which case the system does not have anywhere to go and destroys the Activity and does not return to the Single Instance Activity. The system is in a strange state now since the destroyed Activity is still in the task switcher and can be resumed even though it was destroyed.
This bug in Android has been proven to exist in Android OS versions 5 through to 10. Google themselves advise against using Single Instance Activities, but in case they are used, IProov can still be made to work with this option.
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.
The short answer: It depends. Approximately 500 KB in typical cases.
The long answer:
When assessing the size impact, a key aspect will be to consider how many (if any) dependencies are shared between the iProov SDK and your app.
The iProov Android SDK has the following dependency tree:
+--- io.socket:socket.io-client:0.9.0
| \--- io.socket:engine.io-client:0.9.0
| \--- com.squareup.okhttp3:okhttp:3.8.1
| \--- com.squareup.okio:okio:1.13.0
+--- com.android.support:appcompat-v7:28.0.0
| \--- (Dependency tree truncated)
+--- com.android.support:exifinterface:28.0.0
\--- com.android.support:support-annotations:28.0.0
So if for example your app already uses OkHttp (or another library which depends on OkHttp, such as Retrofit), or the Support Libraries, or uses Jetifier to convert to AndroidX, it will cause a difference in the size impact that the SDK will have on your app.
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 with the iProov SDK included, and generate an APK
B. Modify the same app to remove the iProov SDK, and generate an APK
We then analyzed both SDKs using the built-in Android Studio tools, which showed that the addition of the iProov SDK added approximately 500 KB to the download size of the APK.
NOTE: This does not include the addition of the optional iProov Firebase module (not required by most customers). The Firebase module itself is extremely lightweight and just acts as a thin wrapper around Firebase, so almost the entire size impact of adding Firebase will come from Google's Firebase library itself.
These calculations were performed in February 2020 using Android Studio 3.5.3 and are correct as of iProov SDK 5.0.0.
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
The Android OS SDK is moving from using Support Libraries to AndroidX. Apps that use AndroidX can migrate third party libraries written to use Support Libraries.
This IProov SDK does not use AndroidX and so is compatible with both Support Library and AndroidX based Apps.
NOTE: After 1 August 2019, all apps had to target Android SDK 28 (P), or they would no longer be able to be updated, and SDK 28 (P) supports the final version of the Support Libraries before they are discontinued.