diff --git a/.gitignore b/.gitignore index e06af8b4d1d4c16c3226c017d469b28e5af905ca..7b50eff400c9f394ac86da0ffa2dd3516ace0cbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,61 +1,88 @@ +# Built application files +*.apk +#*.aar +*.ap_ +*.aab + +*.DS_Store + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +release/ + # Gradle files -.gradle +.gradle/ build/ # Local configuration file (sdk path, etc) local.properties -# Log/OS Files -*.log +# Proguard folder generated by Eclipse +proguard/ -# Android Studio generated files and folders -captures/ -.externalNativeBuild/ -.cxx/ -output.json +# Log Files +*.log # Android Studio Navigation editor temp files .navigation/ +# Android Studio captures folder +captures/ + # IntelliJ *.iml .idea -misc.xml -deploymentTargetDropDown.xml -render.experimental.xml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +# Android Studio 3 in .gitignore file. +.idea/caches +.idea/modules.xml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml # Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. #*.jks #*.keystore +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + # Google Services (e.g. APIs or Firebase) #google-services.json -# Android Profiling -*.hprof +# Freeline +freeline.py +freeline/ +freeline_project_description.json -# Generated files -bin/ -gen/ -out/ -release/ - -# Proguard folder generated by Eclipse -proguard/ - -# MacOS -.DS_Store +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md # Version control vcs.xml -# Lint +# lint lint/intermediates/ lint/generated/ lint/outputs/ lint/tmp/ lint/reports/ - -# App Specific cases -app/release/output.json -.idea/codeStyles/ \ No newline at end of file diff --git a/README.md b/README.md index 2390db9b1046a7aee38e632e160e2e0b7cde64ac..af412a871160819ad00be1b519ae49da10985aed 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ - [Handling callbacks](#12-handling-callbacks) - [SDK error codes](#sdk-error-codes) - [Localization](#localization) +- [Custom Organization Details](#custom-organization-details) ## Getting started @@ -23,10 +24,8 @@ The SDK supports API level 21 and above Make sure that your app meets the following requirements: - `minSdkVersion = 21` -- `targetSdkVersion = 31` +- `targetSdkVersion = 33` - `android.useAndroidX = true` -- `Kotlin = 1.5+` -- `Gradle = 4.1.2+` ``` compileOptions { @@ -46,34 +45,36 @@ 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.0-release.aar")) +implementation(files("libs/myid-sdk-2.1.1-release.aar")) ``` -**Note:** You can get `myid-sdk-2.1.0-release.aar` file from [here](app/libs/myid-sdk-2.1.0-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) 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: ``` gradle +implementation(files("libs/myid-sdk-2.1.1-release.aar")) + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") -implementation("androidx.core:core-ktx:1.8.0") -implementation("androidx.appcompat:appcompat:1.4.2") +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-alpha01" +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.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.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:5.7.4") +implementation("io.sentry:sentry-android:6.7.0-alpha.1") ``` ### 1.3 Permissions @@ -111,6 +112,7 @@ class YourActivity : AppCompatActivity(), MyIdResultListener { .withEntryType(MyIdEntryType.AUTH) .withOrganizationDetails(organizationDetails) .withBuildMode(MyIdBuildMode.PRODUCTION) + .withLocale(MyIdLocale.UZ) .withPhoto(false) .build() @@ -133,6 +135,7 @@ Method | Notes | Default `withEntryType(value: MyIdEntryType)` | Customizing the SDK. Entry types: AUTH, FACE | MyIdEntryType.AUTH `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. @@ -155,24 +158,24 @@ the SDK requires the input of passport data and date of birth for user identific ```kotlin val resultListener: 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 + } } ``` @@ -227,9 +230,8 @@ The MyId Android SDK supports translations for the following languages: - English (en) 🇬🇧 - Russian (ru) 🇷🇺 -By default, we infer the language to use from the parent app settings. - -The MyId Android SDK also allows for the selection of a specific custom language for locales that MyId does not currently support. You can have an additional XML strings file inside your resources folder for the desired locale (for example, `res/values-kk/myid_strings.xml` for 🇰🇿 translation), with the content of our [strings.xml](myid_strings.xml) file, translated for that locale. +By default, the Uzbek language is used. However, you can also call the `withLocale(MyIdLocale)` +method of the `MyIdConfig.Builder` configuration to set the language. ## Custom Organization Details diff --git a/app/.DS_Store b/app/.DS_Store index 18736490aa4db6ecb33c373902959e4814f15ed0..6a1240cc5ad6cc2c6d6f5494715cfd7d71c5ad88 100644 Binary files a/app/.DS_Store and b/app/.DS_Store differ diff --git a/app/build.gradle b/app/build.gradle index 08a80f16a4bd5966df3c5da1d3995ab92fa9b807..7a1d0c46daf863d2eebbe63f06b9c48de51792e5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { minSdk 21 targetSdk 33 versionCode 1 - versionName "1.0" + versionName "1.0.0" } buildTypes { @@ -37,27 +37,26 @@ android { } dependencies { - implementation(files("libs/myid-sdk-2.1.0-release.aar")) + implementation(files("libs/myid-sdk-2.1.1-release.aar")) implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") - implementation("androidx.core:core-ktx:1.8.0") - implementation("androidx.appcompat:appcompat:1.4.2") + 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("com.google.android.material:material:1.6.1") - - def cameraVersion = "1.2.0-alpha01" + 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.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.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.sentry:sentry-android:5.7.4") + implementation("io.sentry:sentry-android:6.7.0-alpha.1") } \ No newline at end of file diff --git a/app/libs/myid-sdk-2.1.0-release.aar b/app/libs/myid-sdk-2.1.1-release.aar similarity index 61% rename from app/libs/myid-sdk-2.1.0-release.aar rename to app/libs/myid-sdk-2.1.1-release.aar index 6182696be5246e4c4668f99768719519f9aef100..b3cbd523550c7431e01ff738f0e9cd988aa4011a 100644 Binary files a/app/libs/myid-sdk-2.1.0-release.aar and b/app/libs/myid-sdk-2.1.1-release.aar differ diff --git a/app/src/.DS_Store b/app/src/.DS_Store index 67ee93de8bee810ca46e5a083332afc3ba0d2756..d143c3e1395807a3e90d29aab32ef55a374e3688 100644 Binary files a/app/src/.DS_Store and b/app/src/.DS_Store differ diff --git a/app/src/main/res/color/color_input.xml b/app/src/main/res/color/color_input.xml deleted file mode 100644 index bc6f19b813b9b72ac4c10060bb740f58ea4e4757..0000000000000000000000000000000000000000 --- a/app/src/main/res/color/color_input.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_face.xml b/app/src/main/res/layout/activity_face.xml deleted file mode 100644 index 873b65540f819e45a77567d3fadbb5824fe13afe..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/activity_face.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 3663a440e292a1c6ea09557b34e635293aa1c215..5394079622ab64388d8476939e4fd23249e6a65a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -13,20 +13,26 @@ android:padding="20dp"> + android:inputType="textMultiLine" + android:textAppearance="@style/TextAppearance.Material3.BodyLarge" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:importantForAutofill="no" + android:textAppearance="@style/TextAppearance.Material3.BodyLarge" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:importantForAutofill="no" + android:textAppearance="@style/TextAppearance.Material3.BodyLarge" /> + android:inputType="textMultiLine" + android:textAppearance="@style/TextAppearance.Material3.BodyLarge" /> + android:inputType="phone" + android:textAppearance="@style/TextAppearance.Material3.BodyLarge" /> + android:text="@string/scan_face_data" + android:textAppearance="@style/TextAppearance.Material3.BodyLarge" /> - - #FF6200EE - #FF3700B3 - #FF000000 - #FFFFFFFF - #9E9E9E - \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml deleted file mode 100644 index 8b8441737130b93fa55ddda6863e28d66ab0800c..0000000000000000000000000000000000000000 --- a/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index af754e2949fbf9498775ea5a0a266a51965c657d..c6c20b09a38bcc485708c3a7dbede9afe99eef3c 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,8 +1,4 @@ - +