Skip to content

Commit c1afdad

Browse files
Merge pull request #34 from getyoti/DEP-267
[DEP-267] Release 2.8.1
2 parents 8e8c946 + 6b2c3dc commit c1afdad

File tree

10 files changed

+96
-55
lines changed

10 files changed

+96
-55
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
3+
## [2.8.1] - 2022-03-07
4+
### Fixed
5+
- Manifest merge issue solved.
6+
7+
## [2.8.0] - 2022-03-02
8+
## Critical issue detected on this version (Manifest merge issue on client side), please use 2.8.1
9+
### Added
10+
- Support for Filipino Phil Sys ID & UMID.
11+
- Support for Young Scot Card.
12+
- Improvements on document upload feedback: quality error detection.
13+
- Improvements on NFC scan flow.
14+
315
## [2.7.0] - 2021-09-21
416
### Added
517
- New verification step: Face capture. With it users can provide a selfie of themselves for face match check (ID document photo vs face capture)

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ 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:2.7.0'
58+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:2.8.1'
5959
6060
//If you need supplementary documents
61-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:2.7.0'
61+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:2.8.1'
6262
6363
//If you need liveness
64-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:2.7.0'
64+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:2.8.1'
6565
6666
//If you need selfie capture
67-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:2.7.0'
67+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:2.8.1'
6868
}
6969
```
7070

@@ -191,6 +191,7 @@ class MainActivity : AppCompatActivity() {
191191
| 3001 | An error occurred during a network request | Yes |
192192
| 3002 | User has no network | Yes |
193193
| 4000 | The user did not grant permissions to the camera | Yes |
194+
| 4001 | User Wrong submission | Yes |
194195
| 5000 | No camera (when user's camera was not found and file upload is not allowed) | No |
195196
| 5002 | No more local tries for the liveness flow | Yes |
196197
| 5003 | SDK is out-of-date - please update the SDK to the latest version | No |

app/build.gradle

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
43

54
android {
6-
compileSdkVersion 30
5+
compileSdkVersion 31
76
defaultConfig {
87
applicationId "com.yoti.mobile.android.sdk.yotidocscan.sample"
98
minSdkVersion 21
10-
targetSdkVersion 30
11-
versionCode 270
12-
versionName "2.7.0"
9+
targetSdkVersion 31
10+
versionCode 281
11+
versionName "2.8.1"
1312
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1413
}
1514

@@ -23,6 +22,10 @@ android {
2322
targetCompatibility = '1.8'
2423
}
2524

25+
buildFeatures {
26+
viewBinding true
27+
}
28+
2629
buildTypes {
2730
release {
2831
minifyEnabled true
@@ -32,19 +35,19 @@ android {
3235
'proguard-rules-retrofit.pro'
3336
}
3437
debug {
35-
matchingFallbacks = ['release']
38+
matchingFallbacks = ['release']
3639
}
3740
}
3841
}
3942

4043
dependencies {
4144
implementation fileTree(dir: 'libs', include: ['*.jar'])
4245
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43-
implementation 'androidx.appcompat:appcompat:1.3.1'
44-
implementation 'androidx.core:core-ktx:1.6.0'
46+
implementation 'androidx.appcompat:appcompat:1.4.1'
47+
implementation 'androidx.core:core-ktx:1.7.0'
4548

46-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:2.7.0'
47-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:2.7.0'
48-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:2.7.0'
49-
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:2.7.0'
49+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:2.8.1'
50+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:2.8.1'
51+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:2.8.1'
52+
implementation 'com.yoti.mobile.android.sdk:yoti-sdk-facecapture:2.8.1'
5053
}

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33

44
<application
55
android:allowBackup="true"
6+
android:supportsRtl="true"
67
android:icon="@mipmap/ic_launcher"
78
android:label="@string/app_name"
89
android:roundIcon="@mipmap/ic_launcher_round"
9-
android:supportsRtl="true"
1010
android:theme="@style/AppTheme">
1111

12-
<activity android:name="com.yoti.mobile.android.sdk.yotidocscan.sample.MainActivity">
12+
<activity android:name="com.yoti.mobile.android.sdk.yotidocscan.sample.MainActivity"
13+
android:exported="true">
1314
<intent-filter>
1415
<action android:name="android.intent.action.MAIN" />
1516

app/src/main/java/com/yoti/mobile/android/sdk/yotidocscan/sample/MainActivity.kt

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,39 @@ package com.yoti.mobile.android.sdk.yotidocscan.sample
33
import android.content.Intent
44
import android.os.Bundle
55
import androidx.appcompat.app.AppCompatActivity
6+
import com.yoti.mobile.android.sdk.yotidocscan.sample.databinding.ActivityMainBinding
67
import com.yoti.mobile.android.yotisdkcore.YOTI_SDK_REQUEST_CODE
78
import com.yoti.mobile.android.yotisdkcore.YotiSdk
8-
import kotlinx.android.synthetic.main.activity_main.*
99

1010
class MainActivity : AppCompatActivity() {
1111

1212
private lateinit var yotiSdk: YotiSdk
1313

14+
private lateinit var binding: ActivityMainBinding
15+
1416
private var sessionId: String = ""
1517
private var sessionToken: String = ""
1618

1719
override fun onCreate(savedInstanceState: Bundle?) {
1820
super.onCreate(savedInstanceState)
19-
setContentView(R.layout.activity_main)
2021

21-
edSessionId.setText(sessionId)
22-
edTokenId.setText(sessionToken)
22+
binding = ActivityMainBinding.inflate(layoutInflater)
23+
setContentView(binding.root)
24+
25+
with(binding) {
26+
edSessionId.setText(sessionId)
27+
edTokenId.setText(sessionToken)
2328

24-
yotiSdk = YotiSdk(this)
29+
yotiSdk = YotiSdk(this@MainActivity)
2530

26-
buttonScanDocument.setOnClickListener {
27-
val success = yotiSdk
28-
.setSessionId(edSessionId.text.toString())
29-
.setClientSessionToken(edTokenId.text.toString())
30-
.start(this) // Custom request code .start(this, 8888)
31-
if (!success) {
32-
showSessionStatus()
31+
buttonScanDocument.setOnClickListener {
32+
val success = yotiSdk
33+
.setSessionId(edSessionId.text.toString())
34+
.setClientSessionToken(edTokenId.text.toString())
35+
.start(this@MainActivity) // Custom request code .start(this, 8888)
36+
if (!success) {
37+
showSessionStatus()
38+
}
3339
}
3440
}
3541
}
@@ -45,6 +51,6 @@ class MainActivity : AppCompatActivity() {
4551
private fun showSessionStatus() {
4652
val code = yotiSdk.sessionStatusCode
4753
val description = yotiSdk.sessionStatusDescription
48-
sessionStatusText.text = getString(R.string.session_status_text, code, description)
54+
binding.sessionStatusText.text = getString(R.string.session_status_text, code, description)
4955
}
5056
}

build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
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.5.10'
4+
ext.kotlin_version = '1.6.10'
55
repositories {
66
google()
7-
jcenter()
8-
7+
mavenCentral()
98
}
109
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.2.2'
10+
classpath 'com.android.tools.build:gradle:7.1.2'
1211
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1312
// NOTE: Do not place your application dependencies here; they belong
1413
// in the individual module build.gradle files
@@ -18,7 +17,6 @@ buildscript {
1817
allprojects {
1918
repositories {
2019
google()
21-
jcenter()
2220
mavenCentral()
2321
maven { url 'https://maven.microblink.com' }
2422
maven { url "https://jitpack.io" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

webapp/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
43

54
android {
65
compileSdkVersion 29
7-
buildToolsVersion "29.0.3"
86

97
defaultConfig {
108
applicationId "com.yoti.mobile.android.sdk.yotidocscan.websample"
@@ -16,6 +14,10 @@ android {
1614
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1715
}
1816

17+
buildFeatures {
18+
viewBinding true
19+
}
20+
1921
buildTypes {
2022
release {
2123
minifyEnabled false

webapp/src/main/java/com/yoti/mobile/android/sdk/yotidocscan/websample/MainActivity.kt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import androidx.core.content.ContextCompat
2323
import androidx.core.content.FileProvider
2424
import com.yoti.mobile.android.sdk.yotidocscan.websample.AccelerometerListener.ShakeListener
2525
import com.yoti.mobile.android.sdk.yotidocscan.websample.SessionBottomSheet.SessionConfigurationListener
26-
import kotlinx.android.synthetic.main.activity_main.*
26+
import com.yoti.mobile.android.sdk.yotidocscan.websample.databinding.ActivityMainBinding
2727
import java.io.File
2828
import java.text.SimpleDateFormat
2929
import java.util.Date
@@ -66,7 +66,6 @@ import java.util.Locale
6666
private const val CAPTURE_REQUEST_CODE = 1112
6767
private const val PERMISSIONS_REQUEST_CODE = 1114
6868

69-
private const val TAG = "YdsWebSample"
7069
private const val KEY_IS_VIEW_RECREATED = "MainActivity.KEY_IS_VIEW_RECREATED"
7170
private const val FINISH_SESSION_URL = "https://www.yoti.com/"
7271

@@ -89,15 +88,19 @@ class MainActivity : AppCompatActivity(), SessionConfigurationListener {
8988
".jpg" to "image/jpeg"
9089
)
9190

91+
private lateinit var binding: ActivityMainBinding
92+
9293
override fun onCreate(savedInstanceState: Bundle?) {
9394
super.onCreate(savedInstanceState)
94-
setContentView(R.layout.activity_main)
95+
96+
binding = ActivityMainBinding.inflate(layoutInflater)
97+
setContentView(binding.root)
9598

9699
isViewRecreated = savedInstanceState?.getBoolean(KEY_IS_VIEW_RECREATED) ?: false
97100

98101
requestPermissions()
99102

100-
webview.configureForYdsWeb()
103+
binding.webview.configureForYdsWeb()
101104
}
102105

103106
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
@@ -125,7 +128,7 @@ class MainActivity : AppCompatActivity(), SessionConfigurationListener {
125128
}
126129

127130
override fun onDestroy() {
128-
webview.destroy()
131+
binding.webview.destroy()
129132
super.onDestroy()
130133
}
131134

@@ -296,8 +299,10 @@ class MainActivity : AppCompatActivity(), SessionConfigurationListener {
296299
}
297300

298301
override fun onSessionConfigurationSuccess(sessionUrl: String) {
299-
webview.visibility = VISIBLE
300-
webview.loadUrl(sessionUrl)
302+
with(binding) {
303+
webview.visibility = VISIBLE
304+
webview.loadUrl(sessionUrl)
305+
}
301306
}
302307

303308
override fun onSessionConfigurationDismiss() {

webapp/src/main/java/com/yoti/mobile/android/sdk/yotidocscan/websample/SessionBottomSheet.kt

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import android.view.LayoutInflater
99
import android.view.View
1010
import android.view.ViewGroup
1111
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
12-
import kotlinx.android.synthetic.main.bottom_sheet.*
12+
import com.yoti.mobile.android.sdk.yotidocscan.websample.databinding.BottomSheetBinding
1313

1414
private const val SESSION_PREFERENCES_ID = "SESSION_PREFERENCES_ID"
1515
private const val SESSION_CONFIGURATION_KEY = "SESSION_CONFIGURATION_KEY"
@@ -19,30 +19,38 @@ class SessionBottomSheet: BottomSheetDialogFragment() {
1919
private var sessionConfigurationListener: SessionConfigurationListener? = null
2020
lateinit var sharedPreferences: SharedPreferences
2121

22+
private var _binding: BottomSheetBinding? = null
23+
private val binding: BottomSheetBinding get() = _binding!!
24+
2225
interface SessionConfigurationListener {
2326
fun onSessionConfigurationSuccess(sessionUrl: String)
2427
fun onSessionConfigurationDismiss()
2528
}
2629

2730
override fun onCreateView(
2831
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
29-
): View? = inflater.inflate(R.layout.bottom_sheet, container, false)
32+
): View {
33+
_binding = BottomSheetBinding.inflate(inflater, container, false)
34+
return binding.root
35+
}
3036

3137
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
3238
super.onViewCreated(view, savedInstanceState)
3339

34-
session_url.setText(sharedPreferences.getString(SESSION_CONFIGURATION_KEY, ""))
40+
with (binding) {
41+
sessionUrl.setText(sharedPreferences.getString(SESSION_CONFIGURATION_KEY, ""))
3542

36-
start_session_button.setOnClickListener {
37-
sessionConfigurationListener?.onSessionConfigurationSuccess(
38-
session_url.text.toString()
39-
)
40-
this.dismiss()
43+
startSessionButton.setOnClickListener {
44+
sessionConfigurationListener?.onSessionConfigurationSuccess(
45+
sessionUrl.text.toString()
46+
)
47+
dismiss()
48+
}
4149
}
4250
}
4351

4452
override fun onDismiss(dialog: DialogInterface) {
45-
sharedPreferences.edit().putString(SESSION_CONFIGURATION_KEY, session_url.text.toString()).apply()
53+
sharedPreferences.edit().putString(SESSION_CONFIGURATION_KEY, binding.sessionUrl.text.toString()).apply()
4654
sessionConfigurationListener?.onSessionConfigurationDismiss()
4755
super.onDismiss(dialog)
4856
}
@@ -53,6 +61,11 @@ class SessionBottomSheet: BottomSheetDialogFragment() {
5361
sessionConfigurationListener = context as? SessionConfigurationListener
5462
}
5563

64+
override fun onDestroyView() {
65+
super.onDestroyView()
66+
_binding = null
67+
}
68+
5669
override fun onDetach() {
5770
sessionConfigurationListener = null
5871
super.onDetach()

0 commit comments

Comments
 (0)