Skip to content

Commit 61fe453

Browse files
authored
Merge pull request #51 from getyoti/DEP-519
[DEP-519] Release 3.4.0
2 parents 4cab35b + 11400d5 commit 61fe453

File tree

4 files changed

+50
-14
lines changed

4 files changed

+50
-14
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
3+
## [3.4.0] - 2024-06-06
4+
## Added
5+
- Added a new slim variant of the ID document capture module, which includes a reduced feature set:
6+
no automatic capture via OCR and no NFC capture. Using this variant results in a significantly
7+
smaller APK size (by about 15Mb).
8+
9+
## Changed
10+
- Updated to Kotlin version 1.8
11+
312
## [3.3.0] - 2024-04-24
413
## Added
514
- New error dialog and session status (3003) for slow internet timeouts

README.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,28 @@ Add modules you require to your build.gradle:
5555
```groovy
5656
dependencies {
5757
//If you need document capture
58-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:3.3.0'
58+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:3.4.0'
59+
//Or if you want the version without OCR and NFC capture, which is ~15Mb smaller in size
60+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-slim:3.4.0'
5961
6062
//If you need supplementary documents
61-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:3.3.0'
63+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:3.4.0'
6264
6365
//If you need liveness
64-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:3.3.0'
66+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:3.4.0'
6567
6668
//If you need selfie capture
67-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:3.3.0'
69+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:3.4.0'
6870
//Or if you want the version without an embedded AI model, which is ~20 MB smaller in size
69-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture-unbundled:3.3.0'
71+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture-unbundled:3.4.0'
7072
}
7173
```
7274

73-
As you can see above, there are two options to add the `facecapture` module to your app:
75+
As you can see above, there are two options to add the `doc-scan` module to your app:
76+
- `yoti-sdk-doc-scan` standard ID doc capture flow which uses automatic document capture via OCR and NFC capture for NFC-chip supported documents such as passports
77+
- `yoti-sdk-doc-scan-slim` ID doc capture flow with a reduced feature set, using manual capture without OCR and NFC support. This results in a significantly smaller APK and install size.
78+
79+
There are also two options to add the `facecapture` module to your app:
7480
- `yoti-sdk-facecapture` embeds an AI model for face detection.
7581
- `yoti-sdk-facecapture-unbundled` will manage the download of the AI model via Google Play Services the first time you start using the AI model and thus is ~20 MB smaller in size. Additionally, you can add the following metadata to your `AndroidManifest.xml` to get the model downloaded as soon as the app is installed:
7682
```
@@ -113,6 +119,25 @@ And if you're using [Firebase performance gradle Plugin](https://firebase.google
113119
}
114120
```
115121

122+
To further decrease the size footprint of the SDK, you can also opt to manually exclude some of the educational videos shown in the verification flows:
123+
- `yds_aadhaar_educational` (~750Kb) - only exclude if you do not support the Indian Aadhaar as a valid ID document type.
124+
- `yds_nfc_educational` (~440Kb) - only exclude if you do not support NFC-chipped document types such as certain passports. This is already excluded if you are using the
125+
slim variant of the ID document module (`yoti-sdk-doc-scan-slim`) so no extra action is needed then.
126+
- `yds_liveness_educational` (~560Kb) - only exclude if you're using the `yoti-sdk-liveness-zoom` dependency.
127+
128+
**Note:** It's important to mention that excluding these resources is not recommended and should be only done in case the conditions described above apply to
129+
your use case. Otherwise, the user experience would be impacted on the related screens which will not be showing anything in place of the missing video resources.
130+
131+
To exclude these video resources during build time you have to:
132+
1. Set `shrinkResources true` for your build type in your app `build.gradle` file. This should already be the case if you're concerned about app size.
133+
2. Create a `keep.xml` file in your app module's `res/raw` resource directory, where you specify which resources you want to exclude:
134+
```
135+
<resources xmlns:tools="http://schemas.android.com/tools"
136+
tools:discard="@raw/yds_aadhaar_educational,@raw/yds_nfc_educational,@raw/yds_liveness_educational" />
137+
```
138+
139+
For more information on resource shrinking and excluding resources, check out the [official documentation](https://developer.android.com/build/shrink-code#keep-resources).
140+
116141
### R8 and Proguard
117142

118143
If you are using R8 the shrinking and obfuscation rules are included automatically.

app/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.yoti.mobile.android.sdk.yotidocscan.sample"
88
minSdkVersion 21
99
targetSdkVersion 33
10-
versionCode 330
11-
versionName "3.3.0"
10+
versionCode 340
11+
versionName "3.4.0"
1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1313
}
1414

@@ -46,11 +46,13 @@ dependencies {
4646
implementation 'androidx.appcompat:appcompat:1.4.1'
4747
implementation 'androidx.core:core-ktx:1.7.0'
4848

49-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:3.3.0'
50-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:3.3.0'
51-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:3.3.0'
49+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:3.4.0'
50+
// Alternative version without OCR and NFC capture, ~15Mb smaller in size
51+
// implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-slim:3.4.0'
52+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:3.4.0'
53+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:3.4.0'
5254
// Version with an embedded AI model
53-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:3.3.0'
55+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:3.4.0'
5456
// Alternative version without an embedded AI model, ~20 MB smaller in size
55-
// implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture-unbundled:3.3.0'
57+
// implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture-unbundled:3.4.0'
5658
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.6.21'
4+
ext.kotlin_version = '1.8.10'
55
repositories {
66
google()
77
mavenCentral()

0 commit comments

Comments
 (0)