Commit bc38de4a authored by Javokhir's avatar Javokhir
Browse files

2.2.2

parent 477cd93e
......@@ -2,6 +2,15 @@
All notable changes to this project will be documented in this file.
## [2.2.5] - 19 Oct, 2023
- 🔐 Added enhanced security measures
- Added `withClientHash` method, which is mandatory if using withEntryType(AUTH)
## [2.2.4] - 20 Sep, 2023
- 🔨 Horizontal and landscape orientation bug on edge cases fixed.
## [2.2.3] - 25 Aug, 2023
- Dev base url changed to [devmyid.uz](https://devmyid.uz/).
......@@ -92,7 +101,7 @@ All notable changes to this project will be documented in this file.
- 🔥 Added new `withOrganizationDetails(value: OrganizationDetails)` method. You can customize the
SDK, for it to match your organization's brand
book. [Usage](README.md#custom-organization-details)
book. [Usage](CUSTOMIZATION.md)
- 🌟 Added `comparison` value to the `MyIdResult` object on successful identification.
### Fixes
......@@ -109,4 +118,4 @@ All notable changes to this project will be documented in this file.
### Fixes
- 🔨 `Image's size must be lower than 1600 kb`. This bug fixed.
- 🔨 `Image's size must be lower than 1600 kb`. This bug fixed.
\ No newline at end of file
......@@ -4,12 +4,12 @@
- [Changelog](CHANGELOG.md)
- [Getting started](#getting-started)
- [Before you begin](#11-before-you-begin)
- [Setup MyID Android SDK](#12-setup-myid-android-sdk)
- [Permissions](#13-permissions)
- [Before you begin](#11-before-you-begin)
- [Setup MyID Android SDK](#12-setup-myid-android-sdk)
- [Permissions](#13-permissions)
- [Usage](#usage)
- [Methods](#11-methods)
- [Handling callbacks](#12-handling-callbacks)
- [Methods](#11-methods)
- [Handling callbacks](#12-handling-callbacks)
- [SDK error codes](#sdk-error-codes)
- [UI customization](CUSTOMIZATION.md)
......@@ -45,7 +45,7 @@ repositories {
}
dependencies {
implementation("uz.myid.sdk.capture:myid-capture-sdk:2.2.3")
implementation("uz.myid.sdk.capture:myid-capture-sdk:2.2.5")
}
```
......@@ -81,6 +81,7 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
)
val myIdConfig = MyIdConfig.builder(clientId = /* Your client id */)
.withClientHash(/* Your clientHash */, /* Your clientHashId */)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withSdkHash(sdkHash)
......@@ -129,6 +130,7 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
)
val myIdConfig = MyIdConfig.builder(clientId = /* Your client id */)
.withClientHash(/* Your clientHash */, /* Your clientHashId */)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withSdkHash(sdkHash)
......@@ -159,6 +161,7 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
Method | Notes | Default
--- | --- | ---
`withClientHash(clientHash: String, clientHashId: String)` | Provided by MyID sales team | Mandatory, if using withEntryType(MyIdEntryType.AUTH)
`withPassportData(value: String)` | Passport serial number or PINFL data | Optional
`withBirthDate(value: String)` | Date of birth in. Format: `dd.MM.yyyy` | Optional
`withSdkHash(value: String)` | 32 characters long string | Optional
......@@ -202,24 +205,24 @@ and **[ELLIPSE](images/screen04.jpg)** types.
```kotlin
val myIdResultListener: MyIdResultListener = object : MyIdResultListener {
override fun onSuccess(result: MyIdResult) {
// Get face bitmap and result code
override fun onSuccess(result: MyIdResult) {
// Get face bitmap and result code
val bitmap = result.bitmap
val code = result.code
val comparison = result.comparison
}
val bitmap = result.bitmap
val code = result.code
val comparison = result.comparison
}
override fun onUserExited() {
// User left the SDK
}
override fun onUserExited() {
// User left the SDK
}
override fun onError(e: MyIdException) {
// Get error message and code:
override fun onError(e: MyIdException) {
// Get error message and code:
val message = e.message
val code = e.code
}
val message = e.message
val code = e.code
}
}
```
......@@ -266,4 +269,4 @@ reference.
| 101 | Непредвиденная ошибка
| 102 | Доступ к камере запрещен
| 103 | Ошибка при получении данных с сервера
| 120 | Размытое фото обнаружено в SDK
| 120 | Размытое фото обнаружено в SDK
\ No newline at end of file
......@@ -5,23 +5,19 @@ plugins {
android {
namespace "uz.myid.sdk.sample"
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "uz.myid.sdk.sample"
targetSdk 34
minSdk 21
versionCode 1
versionName "1.0.0"
versionName "1.0"
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
......@@ -37,7 +33,7 @@ android {
}
dependencies {
implementation("com.google.android.material:material:1.9.0")
implementation("com.google.android.material:material:1.10.0")
implementation("uz.myid.sdk.capture:myid-capture-sdk:2.2.3")
implementation("uz.myid.sdk.capture:myid-capture-sdk:2.2.5")
}
\ No newline at end of file
......@@ -3,18 +3,28 @@ package uz.myid.sdk.sample
import android.os.Bundle
import android.widget.EditText
import androidx.appcompat.app.AppCompatActivity
import uz.myid.android.sdk.capture.*
import uz.myid.android.sdk.capture.model.*
import uz.myid.android.sdk.capture.MyIdClient
import uz.myid.android.sdk.capture.MyIdConfig
import uz.myid.android.sdk.capture.MyIdException
import uz.myid.android.sdk.capture.MyIdResult
import uz.myid.android.sdk.capture.MyIdResultListener
import uz.myid.android.sdk.capture.model.MyIdBuildMode
import uz.myid.android.sdk.capture.model.MyIdCameraShape
import uz.myid.android.sdk.capture.model.MyIdEntryType
import uz.myid.android.sdk.capture.model.MyIdImageFormat
import uz.myid.android.sdk.capture.model.MyIdOrganizationDetails
import uz.myid.android.sdk.capture.model.MyIdResidentType
import uz.myid.android.sdk.capture.model.MyIdResolution
import uz.myid.android.sdk.capture.takeUserResult
import uz.myid.sdk.sample.databinding.ActivityMainBinding
import java.util.*
import java.util.Locale
class MainActivity : AppCompatActivity(), MyIdResultListener {
private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }
private val myIdClient = MyIdClient()
private val client = MyIdClient()
private var clientId = ""
private var buildMode = MyIdBuildMode.PRODUCTION
private var entryType = MyIdEntryType.AUTH
private var residency = MyIdResidentType.RESIDENT
......@@ -28,8 +38,6 @@ class MainActivity : AppCompatActivity(), MyIdResultListener {
setContentView(binding.root)
with(binding) {
inputClientId.setText(clientId)
radioGroupLang.setOnCheckedChangeListener { _, checkedId ->
locale = when (checkedId) {
R.id.radioUz -> Locale("uz")
......@@ -57,8 +65,6 @@ class MainActivity : AppCompatActivity(), MyIdResultListener {
} else {
MyIdBuildMode.DEBUG
}
inputClientId.setText(clientId)
}
radioGroupShape.setOnCheckedChangeListener { _, checkedId ->
shape = if (checkedId == R.id.radioCircle) {
......@@ -110,7 +116,11 @@ class MainActivity : AppCompatActivity(), MyIdResultListener {
phoneNumber = binding.inputPhoneNumber.value
)
val myIdConfig = MyIdConfig.builder(binding.inputClientId.value)
val config = MyIdConfig.builder(binding.inputClientId.value)
.withClientHash(
clientHash = binding.inputClientHash.value,
clientHashId = binding.inputClientHashId.value,
)
.withPassportData(binding.inputPassportData.value)
.withBirthDate(binding.inputDate.value)
.withSdkHash(binding.inputSdkHash.value)
......@@ -127,7 +137,7 @@ class MainActivity : AppCompatActivity(), MyIdResultListener {
.withPhoto(binding.checkboxWithPhoto.isChecked)
.build()
val intent = myIdClient.createIntent(this, myIdConfig)
val intent = client.createIntent(this, config)
result.launch(intent)
}
......
......@@ -29,6 +29,42 @@
android:textAppearance="@style/TextAppearance.Material3.BodyLarge" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:hint="@string/client_hash"
app:helperText="* Required"
app:helperTextEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputClientHash"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textMultiLine"
android:textAppearance="@style/TextAppearance.Material3.BodyLarge" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:hint="@string/client_hash_id"
app:helperText="* Required"
app:helperTextEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputClientHashId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textMultiLine"
android:textAppearance="@style/TextAppearance.Material3.BodyLarge" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
......
......@@ -5,24 +5,26 @@
<string name="birth_date">Birth date</string>
<string name="circle">Circle</string>
<string name="client_id">Client ID</string>
<string name="client_hash">Client hash</string>
<string name="client_hash_id">Client hash ID</string>
<string name="dev">Dev</string>
<string name="ellipse">Ellipse</string>
<string name="english">English</string>
<string name="external_id">External id</string>
<string name="face">Face</string>
<string name="image">Image</string>
<string name="manual">Manual</string>
<string name="non_resident">Non resident</string>
<string name="organization_phone_number">Phone number</string>
<string name="passport">Passport or PINFL</string>
<string name="prod">Prod</string>
<string name="resident">Resident</string>
<string name="result_image">Result image</string>
<string name="russian">Russian</string>
<string name="scan_face_data">Scan face data</string>
<string name="sdk_hash">Sdk hash</string>
<string name="threshold">Threshold</string>
<string name="uzbek">Uzbek</string>
<string name="with_photo">With photo</string>
<string name="without_photo">Without photo</string>
<string name="sdk_hash">Sdk hash</string>
<string name="manual">Manual</string>
<string name="resident">Resident</string>
<string name="non_resident">Non resident</string>
</resources>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment