Commit d8a983ae authored by Javokhir Savriev's avatar Javokhir Savriev
Browse files

2.0.7

parents
# MyId Android SDK
## Table of contents
- [Getting started](#getting-started)
- [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)
- [SDK error codes](#sdk-error-codes)
- [Localization](#localization)
- [Sample app](#sample-app)
## Getting started
### 1.1 Before you begin
Install or update Android Studio to its latest version.
The SDK supports API level 21 and above
Make sure that your app meets the following requirements:
- `minSdkVersion = 21`
- `targetSdkVersion = 31`
- `android.useAndroidX = true`
- `Kotlin = 1.5+`
- `Gradle = 4.1.2+`
```
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
```
- myid-sdk-***.aar, has been provided to you, it contains SDK public interface and implementation.
Archive name contains ever increasing release version number.
### 1.2 Setup MyId Android SDK
Create new project in AndroidStudio. Inside mobile application folder create new folder to store SDK
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.0.7-release.aar"))
```
After synchronization, You should be able to acces to SDK classes from your source code.
MyId Android SDK also requires following libraries to be added:
``` gradle
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2")
implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
def cameraVersion = "1.2.0-alpha01"
implementation("androidx.camera:camera-camera2:$cameraVersion")
implementation("androidx.camera:camera-lifecycle:$cameraVersion")
implementation("androidx.camera:camera-view:$cameraVersion")
implementation("com.google.android.gms:play-services-mlkit-face-detection:17.0.1")
implementation("com.google.android.gms:play-services-mlkit-text-recognition:18.0.0")
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0")
implementation("com.google.code.gson:gson:2.9.0")
implementation("io.ktor:ktor-client-android:2.0.1")
implementation("io.sentry:sentry-android:5.7.4")
```
### 1.3 Permissions
Add following lines to the **_AndroidManifest.xml_**:
``` xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
```
## Usage
``` kotlin
class YourActivity : AppCompatActivity(), MyIdResultListener {
private val client: MyIdClient = MyIdClient()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
startMyId()
}
private fun startMyId() {
val myIdConfig = MyIdConfig.builder(clientId = /* Your client id */)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withEntryType(MyIdEntryType.AUTH)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build()
val intent = client.createIntent(activity = this, myIdConfig = myIdConfig)
result.launch(intent)
}
private val result = takeUserResult(listener = this)
}
```
### 1.1 Methods
Method | Notes | Default
--- | --- | ---
`withPassportData(value: String)` | Passport serial number or PINFL data | Optional
`withBirthDate(value: String)` | Date of birth in. Format: `dd.MM.yyyy` | Optional
`withExternalId(value: String)` | 36 characters long. Should match with UUID4 regex | Optional
`withEntryType(value: MyIdEntryType)` | Customizing the SDK. Entry types: AUTH, FACE | MyIdEntryType.AUTH
`withBuildMode(value: MyIdBuildMode)` | Build mode: DEBUG, PRODUCTION | MyIdBuildMode.PRODUCTION
`withLocale(value: MyIdLocale)` | To set a specific language | MyIdLocale.RU
`withPhoto(value: Boolean)` | Return SDK face bitmap | false
**Note 1.1.** `MyIdEntryType` contains **AUTH** and **FACE** types.
- **AUTH** is used to identify the user through the MyId services.
- **FACE** is used to detect a face and returns a picture (bitmap).
**Note 1.2.** You can customize the screen for entering passport data and date of birth in your
application, in which case you can pass these parameters during initialization to the SDK, otherwise
the SDK requires the input of passport data and date of birth for user identification.
**Note 1.3.** `MyIdBuildMode` contains **DEBUG** and **PRODUCTION** modes.
- **DEBUG** is used to sandbox.
- **PRODUCTION** is used to production.
### 1.2 Handling callbacks
```kotlin
val resultListener: MyIdResultListener = object : MyIdResultListener {
override fun onSuccess(result: MyIdResult) {
// Get face bitmap and result code
val bitmap = result.bitmap
val code = result.code
}
override fun onUserExited() {
// User left the SDK
}
override fun onError(e: MyIdException) {
// Get error message and code:
val message = e.message
val code = e.code
}
}
```
| Attribute | Notes |
| -----|-------|
| `onSuccess` | `MyIdResult` contains information about the face captures made during the flow and result code |
| `onUserExited` | User left the SDK flow without completing it. |
| `onError` | Some error happened. `MyIdException` contains information about the error message and code |
## SDK error codes
The error code in the following list may appear during the call of SDK. The list below is for your
reference.
| Code | Error message
|:----------:|:-------------
| 2 | Паспортные данные введены неправильно
| 3 | Не удалось подтвердить жизненность
| 4 | Не удалось распознать
| 5 | Внешний сервис недоступен или работает некорректно
| 6 | Запрашиваемый пользовател скончался
| 7 | Фото с ресурсов не получено
| 8 | Внутренняя ошибка MyID
| 9 | Срок выполнения задачи истек
| 10 | Срок ожидания задачи в очереди истек
| 11 | Сервис MyID не может обработать запрос. Попробуйте повторить позже
| 12 | Сервис MyID не может обработать запрос. Попробуйте повторить позже
| 13 | Сервис MyID не может обработать запрос. Попробуйте повторить позже
| 14 | Не удалось подтвердить жизненность. Некорректная фотография
| 15 | Сервис MyID не может обработать запрос. Попробуйте повторить позже
| 16 | Сервис MyID не может обработать запрос. Попробуйте повторить позже
| 17 | Не удалось распознать. Некорректная фотография
| 18 | Сервис проверки жизненности не может обработать запрос
| 19 | Сервис распознования не может обработать запрос
| 20 | Размытая фотография
| 21 | Лицо не полностью изображено
| 22 | Обнаружено несколько лиц
| 23 | Представленное изображение в градациях серого, требуется цветное изображение
| 24 | Обнаружены затемненные очки
| 25 | СервисТип фотографии не поддерживается
| 26 | Глаза закрыты либо не видны
| 101 | Ошибка в MyId SDK
| 102 | Доступ к камере запрещен
| 103 | Ошибка при получении данных с сервера
## Localization
The MyId Android SDK supports translations for the following languages:
- Uzbek (uz) 🇺🇿
- English (en) 🇬🇧
- Russian (ru) 🇷🇺
By default, the Russian language is used. However, you can also call the `withLocale(MyIdLocale)`
method of the `MyIdConfig.Builder` configuration to set the language.
## Sample App
We have included a [sample app](app) to show how to integrate the MyId Android SDK.
\ No newline at end of file
File added
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
}
android {
compileSdk 31
defaultConfig {
applicationId "uz.myid.sdk.sample"
minSdk 21
targetSdk 31
versionCode 1
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"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation(files("libs/myid-sdk-2.0.7-release.aar"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2")
implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
def cameraVersion = "1.2.0-alpha01"
implementation("androidx.camera:camera-camera2:$cameraVersion")
implementation("androidx.camera:camera-lifecycle:$cameraVersion")
implementation("androidx.camera:camera-view:$cameraVersion")
implementation("com.google.android.gms:play-services-mlkit-face-detection:17.0.1")
implementation("com.google.android.gms:play-services-mlkit-text-recognition:18.0.0")
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0")
implementation("com.google.android.material:material:1.6.1")
implementation("com.google.code.gson:gson:2.9.0")
implementation("io.ktor:ktor-client-android:2.0.1")
implementation("io.sentry:sentry-android:5.7.4")
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uz.myid.sdk.sample">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyIdSample">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package uz.myid.sdk.sample;
import static uz.myid.android.sdk.capture.MyIdResultKt.takeUserResult;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import uz.myid.android.sdk.capture.MyIdBuildMode;
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.MyIdLocale;
import uz.myid.android.sdk.capture.MyIdResult;
import uz.myid.android.sdk.capture.MyIdResultListener;
public class ExampleJavaActivity extends AppCompatActivity implements MyIdResultListener {
private final MyIdClient client = new MyIdClient();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startMyId();
}
@Override
public void onSuccess(@NonNull MyIdResult result) {
// Get face bitmap and result code
}
@Override
public void onError(@NonNull MyIdException e) {
// Get error message and code
}
@Override
public void onUserExited() {
// User exited sdk
}
private void startMyId() {
String clientId = "client_id";
String passportData = "passport_data";
String dateOfBirth = "date_of_birth";
String externalId = "external_id";
MyIdConfig myIdConfig = new MyIdConfig.Builder(clientId)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withEntryType(MyIdEntryType.AUTH)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build();
Intent intent = client.createIntent(this, myIdConfig);
result.launch(intent);
}
private final ActivityResultLauncher<Intent> result = takeUserResult(this, this);
}
\ No newline at end of file
package uz.myid.sdk.sample;
import static uz.myid.android.sdk.capture.MyIdResultKt.takeUserResult;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import uz.myid.android.sdk.capture.MyIdBuildMode;
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.MyIdLocale;
import uz.myid.android.sdk.capture.MyIdResult;
import uz.myid.android.sdk.capture.MyIdResultListener;
public class ExampleJavaFragment extends Fragment implements MyIdResultListener {
private final MyIdClient client = new MyIdClient();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startMyId();
}
@Override
public void onSuccess(@NonNull MyIdResult result) {
// Get face bitmap and result code
}
@Override
public void onError(@NonNull MyIdException e) {
// Get error message and code
}
@Override
public void onUserExited() {
// User exited sdk
}
private void startMyId() {
String clientId = "client_id";
String passportData = "passport_data";
String dateOfBirth = "date_of_birth";
String externalId = "external_id";
MyIdConfig myIdConfig = new MyIdConfig.Builder(clientId)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withEntryType(MyIdEntryType.AUTH)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build();
Intent intent = client.createIntent(requireActivity(), myIdConfig);
result.launch(intent);
}
private final ActivityResultLauncher<Intent> result = takeUserResult(this, this);
}
package uz.myid.sdk.sample
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import uz.myid.android.sdk.capture.*
class ExampleKotlinActivity : AppCompatActivity(), MyIdResultListener {
private val client: MyIdClient = MyIdClient()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
startMyId()
}
override fun onSuccess(result: MyIdResult) {
// Get face bitmap and result code
}
override fun onError(e: MyIdException) {
// Get error message and code
}
override fun onUserExited() {
// User exited sdk
}
private fun startMyId() {
val clientId = "client_id"
val passportData = "passport_data"
val dateOfBirth = "date_of_birth"
val externalId = "external_id"
val myIdConfig = MyIdConfig.builder(clientId)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withEntryType(MyIdEntryType.AUTH)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build()
val intent = client.createIntent(this, myIdConfig)
result.launch(intent)
}
private val result = takeUserResult(this)
}
\ No newline at end of file
package uz.myid.sdk.sample
import android.os.Bundle
import androidx.fragment.app.Fragment
import uz.myid.android.sdk.capture.*
class ExampleKotlinFragment : Fragment(), MyIdResultListener {
private val client: MyIdClient = MyIdClient()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
startMyId()
}
override fun onSuccess(result: MyIdResult) {
// Get face bitmap and result code
}
override fun onError(e: MyIdException) {
// Get error message and code
}
override fun onUserExited() {
// User exited sdk
}
private fun startMyId() {
val clientId = "client_id"
val passportData = "passport_data"
val dateOfBirth = "date_of_birth"
val externalId = "external_id"
val myIdConfig = MyIdConfig.builder(clientId)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withEntryType(MyIdEntryType.AUTH)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build()
val intent = client.createIntent(requireActivity(), myIdConfig)
result.launch(intent)
}
private val result = takeUserResult(this)
}
\ No newline at end of file
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.sdk.sample.databinding.ActivityMainBinding
class MainActivity : AppCompatActivity(), MyIdResultListener {
private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }
private val client = MyIdClient()
private var clientId = ""
private var myIdEntryType = MyIdEntryType.AUTH
private var myIdBuildMode = MyIdBuildMode.PRODUCTION
private var myIdLocale = MyIdLocale.EN
private var withPhoto = false
private var code = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
with(binding) {
inputClientId.setText(clientId)
radioGroupLang.setOnCheckedChangeListener { _, checkedId ->
myIdLocale = when (checkedId) {
R.id.radioUz -> MyIdLocale.UZ
R.id.radioEn -> MyIdLocale.EN
else -> MyIdLocale.RU
}
}
radioGroupEntry.setOnCheckedChangeListener { _, checkedId ->
myIdEntryType = if (checkedId == R.id.radioFace) {
MyIdEntryType.FACE
} else {
MyIdEntryType.AUTH
}
}
radioGroupBuildType.setOnCheckedChangeListener { _, checkedId ->
myIdBuildMode = if (checkedId == R.id.radioProd) {
MyIdBuildMode.PRODUCTION
} else {
MyIdBuildMode.DEBUG
}
}
radioGroupPhoto.setOnCheckedChangeListener { _, checkedId ->
withPhoto = (checkedId == R.id.radioWith)
}
buttonStart.setOnClickListener { startMyId() }
}
}
override fun onSuccess(result: MyIdResult) {
code = result.code.orEmpty()
with(binding) {
imageResult.setImageBitmap(result.bitmap)
"Result code: ${result.code}".also { textResult.text = it }
}
}
override fun onError(e: MyIdException) {
code = ""
with(binding) {
imageResult.setImageBitmap(null)
"""
Result error: ${e.message}
Result error code: ${e.code}
""".trimIndent().also { textResult.text = it }
}
}
override fun onUserExited() {
code = ""
with(binding) {
imageResult.setImageBitmap(null)
"User exited".also { textResult.text = it }
}
}
private fun startMyId() {
val myIdConfig = MyIdConfig.builder(binding.inputClientId.value)
.withPassportData(binding.inputPassportData.value)
.withBirthDate(binding.inputDate.value)
.withExternalId(binding.inputExternalId.value)
.withEntryType(myIdEntryType)
.withBuildMode(myIdBuildMode)
.withLocale(myIdLocale)
.withPhoto(withPhoto)
.build()
val intent = client.createIntent(this, myIdConfig)
result.launch(intent)
}
private val result = takeUserResult(this)
private inline val EditText.value: String get() = text.toString().trim()
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/purple_500" android:state_focused="true" />
<item android:color="@color/purple_500" android:state_hovered="true" />
<item android:color="@color/color_gray_500" android:state_enabled="false" />
<item android:color="@color/color_gray_500" />
</selector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">
<com.google.android.material.textfield.TextInputLayout
style="@style/TextInputOutlined"
android:hint="@string/client_id"
app:helperText="* Required"
app:helperTextEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputClientId"
style="@style/TextInput"
android:importantForAutofill="no"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/TextInputOutlined"
android:layout_marginTop="12dp"
android:hint="@string/passport"
app:helperText="* Optional"
app:helperTextEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputPassportData"
style="@style/TextInput"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/TextInputOutlined"
android:layout_marginTop="12dp"
android:hint="@string/birth_date"
app:helperText="* Optional"
app:helperTextEnabled="true"
app:placeholderText="дд.мм.гггг">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputDate"
style="@style/TextInput"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/TextInputOutlined"
android:layout_marginTop="12dp"
android:hint="@string/external_id"
app:helperText="* Optional"
app:helperTextEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputExternalId"
style="@style/TextInput"
android:importantForAutofill="no"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
<RadioGroup
android:id="@+id/radioGroupLang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:checkedButton="@id/radioEn"
android:orientation="vertical">
<RadioButton
android:id="@+id/radioUz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uzbek" />
<RadioButton
android:id="@+id/radioEn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/english" />
<RadioButton
android:id="@+id/radioRu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/russian" />
</RadioGroup>
<RadioGroup
android:id="@+id/radioGroupEntry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/myid_dp_12"
android:checkedButton="@id/radioAuth"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioAuth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/auth" />
<RadioButton
android:id="@+id/radioFace"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/face" />
</RadioGroup>
<RadioGroup
android:id="@+id/radioGroupBuildType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/myid_dp_12"
android:checkedButton="@id/radioProd"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioProd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/prod" />
<RadioButton
android:id="@+id/radioDev"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/dev" />
</RadioGroup>
<RadioGroup
android:id="@+id/radioGroupPhoto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/myid_dp_12"
android:checkedButton="@id/radioWithout"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioWith"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/with_photo" />
<RadioButton
android:id="@+id/radioWithout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/without_photo" />
</RadioGroup>
<com.google.android.material.button.MaterialButton
android:id="@+id/buttonStart"
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:text="@string/scan_face_data" />
<TextView
android:id="@+id/textResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/result_image"
android:textSize="20sp" />
<ImageView
android:id="@+id/imageResult"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_marginTop="16dp"
android:contentDescription="@string/image" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
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