Commit 84912679 authored by Javokhir's avatar Javokhir
Browse files

2.1.2 version:

parent 2d7d6ef5
<component name="libraryTable">
<library name="Gradle: io.ktor:ktor-websockets-jvm:2.0.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websockets-jvm/2.0.1/d084191f8b1e6cfecd7c07313948d31ad79f26d4/ktor-websockets-jvm-2.0.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websockets-jvm/2.0.1/6dd8e5b3f3d3a30b8e7d702cccfe4cb092e74b3c/ktor-websockets-jvm-2.0.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websockets-jvm/2.0.1/68ffc7bfe494bcfb6b0561283b3c5b26eac84864/ktor-websockets-jvm-2.0.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: io.sentry:sentry:5.7.4">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry/5.7.4/94bf6862d11821cac08e18816f3d7e72a702237/sentry-5.7.4.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry/5.7.4/ca06ae8fff7bce920c6998d5ad73663f884b6974/sentry-5.7.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry/5.7.4/36eb0d7a95436b19d8bc88c44400be4fee0f6dd5/sentry-5.7.4-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: io.sentry:sentry-android:5.7.4@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/a129296d75c6a4ed320d46b1503e758a/jetified-sentry-android-5.7.4/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/a129296d75c6a4ed320d46b1503e758a/jetified-sentry-android-5.7.4/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/a129296d75c6a4ed320d46b1503e758a/jetified-sentry-android-5.7.4/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry-android/5.7.4/2b624613c87c63525c64365546df4119990a59c4/sentry-android-5.7.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry-android/5.7.4/f56dbb00d2bfa35272003025786e31e1441bc409/sentry-android-5.7.4-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: io.sentry:sentry-android-core:5.7.4@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/5a450b994f55419f072627229a5046b0/jetified-sentry-android-core-5.7.4/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/5a450b994f55419f072627229a5046b0/jetified-sentry-android-core-5.7.4/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/5a450b994f55419f072627229a5046b0/jetified-sentry-android-core-5.7.4/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry-android-core/5.7.4/fe8176cb23519f329f5531d47f6d321813ae4fba/sentry-android-core-5.7.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry-android-core/5.7.4/bb893162a3553c2f263a1a14f60927b7b794e55c/sentry-android-core-5.7.4-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: io.sentry:sentry-android-ndk:5.7.4@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ff87c30cd2812e33aeb1b525f5a245b1/jetified-sentry-android-ndk-5.7.4/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ff87c30cd2812e33aeb1b525f5a245b1/jetified-sentry-android-ndk-5.7.4/res" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/ff87c30cd2812e33aeb1b525f5a245b1/jetified-sentry-android-ndk-5.7.4/AndroidManifest.xml" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry-android-ndk/5.7.4/e8d8ef43ec02a593d8b29a93fcda6327dfd949bb/sentry-android-ndk-5.7.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.sentry/sentry-android-ndk/5.7.4/d8cb4756737ed9356c13406dc10a6673a8a0b25c/sentry-android-ndk-5.7.4-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.6.21">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.21/11ef67f1900634fd951bad28c53ec957fabbe5b8/kotlin-stdlib-1.6.21.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.21/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-1.6.21-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.21/bc58085192d5abb48080e3670915133715a33ce0/kotlin-stdlib-1.6.21-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21" type="kotlin.common">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.21/5e5b55c26dbc80372a920aef60eb774b714559b8/kotlin-stdlib-common-1.6.21.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.21/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-common-1.6.21-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.21/4161056305b7cdaf52a6fd0c051b06ad03f9bd49/kotlin-stdlib-common-1.6.21-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.21/568c1b78a8e17a4f35b31f0a74e2916095ed74c2/kotlin-stdlib-jdk7-1.6.21.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.21/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-jdk7-1.6.21-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.21/78b7fc534a411952d7579a61d02b70fdd34aa56c/kotlin-stdlib-jdk7-1.6.21-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.6.21/eeb4d60d75e9ea9c11200d52974e522793b14fba/kotlin-stdlib-jdk8-1.6.21.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.6.21/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-jdk8-1.6.21-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.6.21/2cb762c1a14a3a958fd18d29f59491fa300e42d4/kotlin-stdlib-jdk8-1.6.21-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
......@@ -4,8 +4,8 @@
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="4.1.3" />
<option name="LAST_KNOWN_AGP_VERSION" value="4.1.3" />
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="7.3.0" />
<option name="LAST_KNOWN_AGP_VERSION" value="7.3.0" />
</configuration>
</facet>
<facet type="android" name="Android">
......
This diff is collapsed.
# MyId Android SDK
# MyID Android SDK
## Table of contents
- [Important](#important)
- [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)
- [Localization](#localization)
- [Custom Organization Details](#custom-organization-details)
## Important
**Note:** When you update the version of MyID SDK in your application, check the version of the
libraries in [dependencies](#12-setup-myid-android-sdk) and update them too!
## Getting started
### 1.1 Before you begin
......@@ -27,54 +33,58 @@ Make sure that your app meets the following requirements:
- `targetSdkVersion = 33`
- `android.useAndroidX = true`
```
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
``` gradle
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
### 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.
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.1-release.aar"))
implementation(files("libs/myid-sdk-2.1.2-release.aar"))
```
**Note:** You can get `myid-sdk-2.1.1-release.aar` file from [here](app/libs/myid-sdk-2.1.1-release.aar)
**Note:** You can get `myid-sdk-2.1.2-release.aar` file
from [here](app/libs/myid-sdk-2.1.2-release.aar)
After synchronization, You should be able to access to SDK classes from your source code.
MyId Android SDK also requires following libraries to be added:
MyID Android SDK also requires following libraries to be added:
``` gradle
implementation(files("libs/myid-sdk-2.1.1-release.aar"))
dependencies {
implementation(files("libs/myid-sdk-2.1.2-release.aar"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
def cameraVersion = "1.2.0-rc01"
implementation("androidx.camera:camera-camera2:$cameraVersion")
implementation("androidx.camera:camera-lifecycle:$cameraVersion")
implementation("androidx.camera:camera-view:$cameraVersion")
def cameraVersion = "1.2.0-rc01"
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.1.0")
implementation("com.google.android.gms:play-services-mlkit-text-recognition:18.0.2")
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0")
implementation("com.google.android.gms:play-services-mlkit-face-detection:17.1.0")
implementation("com.google.android.gms:play-services-mlkit-text-recognition:18.0.2")
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0")
implementation("io.ktor:ktor-client-android:2.0.1")
implementation("io.sentry:sentry-android:6.7.0-alpha.1")
implementation("io.ktor:ktor-client-android:2.1.2")
implementation("io.sentry:sentry-android:6.7.0-alpha.1")
}
```
### 1.3 Permissions
......@@ -91,7 +101,7 @@ Add following lines to the **_AndroidManifest.xml_**:
``` kotlin
class YourActivity : AppCompatActivity(), MyIdResultListener {
private val client: MyIdClient = MyIdClient()
private val myIdClient = MyIdClient()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
......@@ -109,10 +119,11 @@ class YourActivity : AppCompatActivity(), MyIdResultListener {
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withThreshold(threshold)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withEntryType(MyIdEntryType.AUTH)
.withLocale(Locale("en"))
.withCameraShape(MyIdCameraShape.CIRCLE)
.withOrganizationDetails(organizationDetails)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.UZ)
.withPhoto(false)
.build()
......@@ -132,15 +143,16 @@ Method | Notes | Default
`withBirthDate(value: String)` | Date of birth in. Format: `dd.MM.yyyy` | Optional
`withExternalId(value: String)` | 36 characters long. Should match with UUID4 regex | Optional
`withThreshold(value: Float)` | The value can be in the range of `0.50` - `0.99` | 0.50
`withEntryType(value: MyIdEntryType)` | Customizing the SDK. Entry types: AUTH, FACE | MyIdEntryType.AUTH
`withBuildMode(value: MyIdBuildMode)` | Build mode | MyIdBuildMode.PRODUCTION
`withEntryType(value: MyIdEntryType)` | Customizing the SDK Entry types | MyIdEntryType.AUTH
`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
`withBuildMode(value: MyIdBuildMode)` | Build mode: DEBUG, PRODUCTION | MyIdBuildMode.PRODUCTION
`withLocale(value: MyIdLocale)` | To set a specific language | MyIdLocale.UZ
`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.
- **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
......@@ -152,12 +164,17 @@ the SDK requires the input of passport data and date of birth for user identific
- **DEBUG** is used to sandbox.
- **PRODUCTION** is used to production.
**Note 1.4.** If the externalId is not empty, has a length of 36 characters and corresponds to the regular expression UUID4, we will display a [recommendation](images/screen01.jpg) screen in case the sdk detects a blurry photo.
**Note 1.4.** If the externalId is not empty, has a length of 36 characters and corresponds to the
regular expression UUID4, we will display a [recommendation](images/screen01.jpg) screen in case the
sdk detects a blurry photo.
**Note 1.5.** `MyIdCameraShape` contains **[CIRCLE](images/screen03.jpg)**
and **[ELLIPSE](images/screen04.jpg)** types.
### 1.2 Handling callbacks
```kotlin
val resultListener: MyIdResultListener = object : MyIdResultListener {
val myIdResultListener: MyIdResultListener = object : MyIdResultListener {
override fun onSuccess(result: MyIdResult) {
// Get face bitmap and result code
......@@ -224,18 +241,24 @@ reference.
## Localization
The MyId Android SDK supports translations for the following languages:
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(MyIdLocale)`
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.
\ No newline at end of file
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.
\ No newline at end of file
......@@ -37,7 +37,9 @@ android {
}
dependencies {
implementation(files("libs/myid-sdk-2.1.1-release.aar"))
implementation(files("libs/myid-sdk-2.1.2-release.aar"))
implementation("com.google.android.material:material:1.7.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
......@@ -55,8 +57,7 @@ dependencies {
implementation("com.google.android.gms:play-services-mlkit-face-detection:17.1.0")
implementation("com.google.android.gms:play-services-mlkit-text-recognition:18.0.2")
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0")
implementation("com.google.android.material:material:1.7.0")
implementation("io.ktor:ktor-client-android:2.0.1")
implementation("io.ktor:ktor-client-android:2.1.2")
implementation("io.sentry:sentry-android:6.7.0-alpha.1")
}
\ No newline at end of file
......@@ -2,6 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uz.myid.sdk.sample">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
......
......@@ -9,19 +9,21 @@ import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.NonNull;
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.MyIdLocale;
import uz.myid.android.sdk.capture.MyIdResult;
import uz.myid.android.sdk.capture.MyIdResultListener;
import uz.myid.android.sdk.capture.model.OrganizationDetails;
public class ExampleJavaActivity extends AppCompatActivity implements MyIdResultListener {
private final MyIdClient client = new MyIdClient();
private final MyIdClient myIdClient = new MyIdClient();
@Override
public void onCreate(Bundle savedInstanceState) {
......@@ -31,7 +33,7 @@ public class ExampleJavaActivity extends AppCompatActivity implements MyIdResult
@Override
public void onSuccess(@NonNull MyIdResult result) {
// Get face bitmap and result code
// Get face bitmap, result code, comparison value
}
@Override
......@@ -61,14 +63,15 @@ public class ExampleJavaActivity extends AppCompatActivity implements MyIdResult
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withThreshold(threshold)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withEntryType(MyIdEntryType.AUTH)
.withLocale(new Locale("en"))
.withCameraShape(MyIdCameraShape.CIRCLE)
.withOrganizationDetails(organizationDetails)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build();
Intent intent = client.createIntent(this, myIdConfig);
Intent intent = myIdClient.createIntent(this, myIdConfig);
result.launch(intent);
}
......
......@@ -9,19 +9,21 @@ import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.NonNull;
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.MyIdLocale;
import uz.myid.android.sdk.capture.MyIdResult;
import uz.myid.android.sdk.capture.MyIdResultListener;
import uz.myid.android.sdk.capture.model.OrganizationDetails;
public class ExampleJavaFragment extends Fragment implements MyIdResultListener {
private final MyIdClient client = new MyIdClient();
private final MyIdClient myIdClient = new MyIdClient();
@Override
public void onCreate(Bundle savedInstanceState) {
......@@ -31,7 +33,7 @@ public class ExampleJavaFragment extends Fragment implements MyIdResultListener
@Override
public void onSuccess(@NonNull MyIdResult result) {
// Get face bitmap and result code
// Get face bitmap, result code, comparison value
}
@Override
......@@ -61,14 +63,15 @@ public class ExampleJavaFragment extends Fragment implements MyIdResultListener
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withThreshold(threshold)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withEntryType(MyIdEntryType.AUTH)
.withLocale(new Locale("en"))
.withCameraShape(MyIdCameraShape.CIRCLE)
.withOrganizationDetails(organizationDetails)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build();
Intent intent = client.createIntent(requireActivity(), myIdConfig);
Intent intent = myIdClient.createIntent(requireActivity(), myIdConfig);
result.launch(intent);
}
......
......@@ -4,10 +4,11 @@ import android.os.Bundle
import androidx.fragment.app.Fragment
import uz.myid.android.sdk.capture.*
import uz.myid.android.sdk.capture.model.OrganizationDetails
import java.util.*
class ExampleKotlinFragment : Fragment(), MyIdResultListener {
private val client: MyIdClient = MyIdClient()
private val myIdClient = MyIdClient()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
......@@ -38,19 +39,20 @@ class ExampleKotlinFragment : Fragment(), MyIdResultListener {
logo = R.drawable.image_logo
)
val myIdConfig = MyIdConfig.builder(clientId)
val myIdConfig = MyIdConfig.Builder(clientId)
.withPassportData(passportData)
.withBirthDate(dateOfBirth)
.withExternalId(externalId)
.withThreshold(threshold)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withEntryType(MyIdEntryType.AUTH)
.withLocale(Locale("en"))
.withCameraShape(MyIdCameraShape.CIRCLE)
.withOrganizationDetails(organizationDetails)
.withBuildMode(MyIdBuildMode.PRODUCTION)
.withLocale(MyIdLocale.EN)
.withPhoto(false)
.build()
val intent = client.createIntent(requireActivity(), myIdConfig)
val intent = myIdClient.createIntent(requireActivity(), myIdConfig)
result.launch(intent)
}
......
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