Commit 6f699f6a authored by Javohir Savriy's avatar Javohir Savriy
Browse files

2.1.6

parent 4d04bc45
......@@ -2,6 +2,17 @@
All notable changes to this project will be documented in this file.
## [2.1.6] - 12 Apr, 2023
### New features
- Added new ability to customize the colors, buttons and strings used in the SDK flow.
- Added new Driver license detection.
### Fixes
- 🔨 Date of birth bug fixed.
## [2.1.5] - 25 Mar, 2023
### Changed features
......
#### The Android SDK supports the customization of colors, buttons and strings used in the SDK flow.
- [Localization](#localization)
- [Custom Organization Details](#custom-organization-details)
- [UI customization](#ui-customization)
## Localization
The MyID Android SDK supports translations for the following languages:
- Uzbek (uz) 🇺🇿
- English (en) 🇬🇧
- Russian (ru) 🇷🇺
By default, the Uzbek language is used. However, you can also call the `withLocale(Locale)`
method of the `MyIdConfig.Builder` configuration to set the language.
## Custom Organization Details
You can customize the SDK, for it to match your organization's brand book, by
providing `MyIdOrganizationDetails` object to `withOrganizationDetails` method. The object allows you to
customize following fields:
- *phoneNumber* - by default 712022202, which is MyID's call center. If you would like the customer
to call your own call center, you can display your own phone number on the error screen, by
providing it in this field ([sample](images/screen01.jpg)).
- *logo* - the drawable asset, that will be displayed on the input screen. If you would like to
display your own logo on the top of the screen, this is the place to provide it. Make sure it fits
the imageView element, which has the *240x60* size.
## UI customization
**Colors**
You can define custom colors inside your own `colors.xml` file:
* `myidColorPrimary`: Defines the color of SDK which guides the user through the flow
* `myidColorSecondary`: Defines the color of the frames
* `myidColorError`: Defines the color of the error buttons, icons and states
* `myidPrimaryButtonColor`: Defines the background color of the primary action buttons
* `myidPrimaryButtonColorDisabled`: Defines the background color of the primary disabled buttons
* `myidPrimaryButtonTextColor`: Defines the color of the text inside the primary action buttons
* `myidPrimaryButtonTextColorDisabled`: Defines the color of the text inside the primary disabled buttons
**Widgets**
You can customize the appearance of some widgets in your `dimens.xml` file by overriding:
* `myidButtonCornerRadius`: Defines the radius dimension of all the corners of primary buttons
#
![Screenshot](images/frame_1.jpg)
![Screenshot](images/frame_2.jpg)
![Screenshot](images/frame_3.jpg)
![Screenshot](images/frame_4.jpg)
\ No newline at end of file
......@@ -12,8 +12,7 @@
- [Methods](#11-methods)
- [Handling callbacks](#12-handling-callbacks)
- [SDK error codes](#sdk-error-codes)
- [Localization](#localization)
- [Custom Organization Details](#custom-organization-details)
- [UI customization](CUSTOMIZATION.md)
## Important
......@@ -52,11 +51,11 @@ libraries (For example libs) and copy MyID SDK provided libraries.
Add reference to library to module **_build.gradle_**:
``` gradle
implementation(files("libs/myid-sdk-2.1.5-release.aar"))
implementation(files("libs/myid-sdk-2.1.6-release.aar"))
```
**Note:** You can get `myid-sdk-2.1.5-release.aar` file
from [here](app/libs/myid-sdk-2.1.5-release.aar)
**Note:** You can get `myid-sdk-2.1.6-release.aar` file
from [here](app/libs/myid-sdk-2.1.6-release.aar)
After synchronization, You should be able to access to SDK classes from your source code.
......@@ -64,7 +63,7 @@ MyID Android SDK also requires following libraries to be added:
``` gradle
dependencies {
implementation(files("libs/myid-sdk-2.1.5-release.aar"))
implementation(files("libs/myid-sdk-2.1.6-release.aar"))
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
......@@ -87,7 +86,6 @@ dependencies {
implementation("com.google.mlkit:barcode-scanning:17.1.0")
implementation("io.ktor:ktor-client-android:2.1.2")
implementation("io.sentry:sentry-android:6.16.0")
}
```
......@@ -115,7 +113,7 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
}
private fun startMyId() {
val organizationDetails = OrganizationDetails(
val organizationDetails = MyIdOrganizationDetails(
phoneNumber = "1234567",
logo = R.drawable.image_logo
)
......@@ -161,7 +159,7 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
}
private fun startMyId() {
val organizationDetails = OrganizationDetails(
val organizationDetails = MyIdOrganizationDetails(
phoneNumber = "1234567",
logo = R.drawable.image_logo
)
......@@ -205,7 +203,7 @@ Method | Notes | Default
`withResidency(value: MyIdResidentType)` | To set a specific resident type | MyIdResidentType.RESIDENT
`withLocale(value: Locale)` | To set a specific locale | Locale("uz")
`withCameraShape(value: MyIdCameraShape)` | To set a specific camera shape | MyIdCameraShape.CIRCLE
`withOrganizationDetails(value: OrganizationDetails)` | Custom Organization Details | Optional
`withOrganizationDetails(value: MyIdOrganizationDetails)` | Custom Organization Details | Optional
`withPhoto(value: Boolean)` | Return SDK face bitmap | false
**Note 1.1.** You can customize the screen for entering passport data and date of birth in your
......@@ -301,27 +299,3 @@ reference.
| 102 | Доступ к камере запрещен
| 103 | Ошибка при получении данных с сервера
| 120 | Размытое фото обнаружено в SDK
## Localization
The MyID Android SDK supports translations for the following languages:
- Uzbek (uz) 🇺🇿
- English (en) 🇬🇧
- Russian (ru) 🇷🇺
By default, the Uzbek language is used. However, you can also call the `withLocale(Locale)`
method of the `MyIdConfig.Builder` configuration to set the language.
## Custom Organization Details
You can customize the SDK, for it to match your organization's brand book, by
providing `OrganizationDetails` object to `withOrganizationDetails` method. The object allows you to
customize following fields:
- *phoneNumber* - by default 712022202, which is MyID's call center. If you would like the customer
to call your own call center, you can display your own phone number on the error screen, by
providing it in this field ([sample](images/screen01.jpg)).
- *logo* - the drawable asset, that will be displayed on the input screen. If you would like to
display your own logo on the top of the screen, this is the place to provide it. Make sure it fits
the imageView element, which has the *240x60* size.
......@@ -37,7 +37,7 @@ android {
}
dependencies {
implementation(files("libs/myid-sdk-2.1.5-release.aar"))
implementation(files("libs/myid-sdk-2.1.6-release.aar"))
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
......@@ -55,5 +55,4 @@ dependencies {
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.2.0")
implementation("io.ktor:ktor-client-android:2.1.2")
implementation("io.sentry:sentry-android:6.16.0")
}
\ No newline at end of file
......@@ -11,15 +11,15 @@ import androidx.appcompat.app.AppCompatActivity;
import java.util.Locale;
import uz.myid.android.sdk.capture.MyIdBuildMode;
import uz.myid.android.sdk.capture.MyIdCameraShape;
import uz.myid.android.sdk.capture.MyIdClient;
import uz.myid.android.sdk.capture.MyIdConfig;
import uz.myid.android.sdk.capture.MyIdEntryType;
import uz.myid.android.sdk.capture.MyIdException;
import uz.myid.android.sdk.capture.MyIdResidentType;
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.MyIdResidentType;
public class ExampleJavaActivity extends AppCompatActivity implements MyIdResultListener {
......
......@@ -11,15 +11,15 @@ import androidx.fragment.app.Fragment;
import java.util.Locale;
import uz.myid.android.sdk.capture.MyIdBuildMode;
import uz.myid.android.sdk.capture.MyIdCameraShape;
import uz.myid.android.sdk.capture.MyIdClient;
import uz.myid.android.sdk.capture.MyIdConfig;
import uz.myid.android.sdk.capture.MyIdEntryType;
import uz.myid.android.sdk.capture.MyIdException;
import uz.myid.android.sdk.capture.MyIdResidentType;
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.MyIdResidentType;
public class ExampleJavaFragment extends Fragment implements MyIdResultListener {
......
......@@ -3,7 +3,7 @@ package uz.myid.sdk.sample
import android.os.Bundle
import androidx.fragment.app.Fragment
import uz.myid.android.sdk.capture.*
import uz.myid.android.sdk.capture.model.OrganizationDetails
import uz.myid.android.sdk.capture.model.*
import java.util.*
class ExampleKotlinFragment : Fragment(), MyIdResultListener {
......@@ -35,7 +35,7 @@ class ExampleKotlinFragment : Fragment(), MyIdResultListener {
val externalId = "external_id"
val threshold = 0.50f
val organizationDetails = OrganizationDetails(
val organizationDetails = MyIdOrganizationDetails(
phoneNumber = "1234567",
)
......
......@@ -4,7 +4,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import uz.myid.android.sdk.capture.*
import uz.myid.android.sdk.capture.model.OrganizationDetails
import uz.myid.android.sdk.capture.model.*
import java.util.*
class ExampleWithOnActivityResultActivity : AppCompatActivity(), MyIdResultListener {
......@@ -41,7 +41,7 @@ class ExampleWithOnActivityResultActivity : AppCompatActivity(), MyIdResultListe
val externalId = "external_id"
val threshold = 0.50f
val organizationDetails = OrganizationDetails(
val organizationDetails = MyIdOrganizationDetails(
phoneNumber = "1234567",
)
......
......@@ -4,7 +4,7 @@ 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.OrganizationDetails
import uz.myid.android.sdk.capture.model.*
import uz.myid.sdk.sample.databinding.ActivityMainBinding
import java.util.*
......@@ -106,7 +106,7 @@ class MainActivity : AppCompatActivity(), MyIdResultListener {
}
private fun startMyId() {
val organizationDetails = OrganizationDetails(
val organizationDetails = MyIdOrganizationDetails(
phoneNumber = binding.inputPhoneNumber.value
)
......
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