Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MYID Public Code
MyID Sample Android
Commits
1cff114f
Commit
1cff114f
authored
Jul 24, 2023
by
Javohir Savriy
Browse files
Published new 2.2.1 version
parent
ea1a0a25
Changes
5
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
1cff114f
...
...
@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
## [2.2.0] - 24 Jul, 2023
-
🔥 Converted to maven
## [2.1.7] - 20 Jun, 2023
-
Added new
`withResolution(value: MyIdResolution)`
method for resolution.
...
...
README.md
View file @
1cff114f
...
...
@@ -3,7 +3,6 @@
## Table of contents
-
[
Changelog
](
CHANGELOG.md
)
-
[
Important
](
#important
)
-
[
Getting started
](
#getting-started
)
-
[
Before you begin
](
#11-before-you-begin
)
-
[
Setup MyID Android SDK
](
#12-setup-myid-android-sdk
)
...
...
@@ -14,11 +13,6 @@
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
UI customization
](
CUSTOMIZATION.md
)
## 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
...
...
@@ -31,6 +25,7 @@ Make sure that your app meets the following requirements:
-
`minSdkVersion = 21`
-
`targetSdkVersion = 33`
-
`Kotlin = 1.8.10+`
-
`android.useAndroidX = true`
```
gradle
...
...
@@ -40,55 +35,22 @@ compileOptions {
}
```
-
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.1.7-release.aar"
))
```
**Note:**
You can get
`myid-sdk-2.1.7-release.aar`
file
from
[
here
](
app/libs/myid-sdk-2.1.7-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
repositories
{
maven
{
url
"https://artifactory.aigroup.uz:443/artifactory/myid"
}
}
```
gradle
dependencies
{
implementation
(
files
(
"libs/myid-sdk-2.1.7-release.aar"
))
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.2"
implementation
(
"androidx.camera:camera-camera2:$cameraVersion"
)
implementation
(
"androidx.camera:camera-lifecycle:$cameraVersion"
)
implementation
(
"androidx.camera:camera-view:$cameraVersion"
)
// Use these dependencies if your app supports Google Play Services
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.2.0"
)
// Use these dependencies if your app doesn't support Google Play Services
implementation
(
"com.google.mlkit:face-detection:16.1.5"
)
implementation
(
"com.google.mlkit:text-recognition:16.0.0-beta6"
)
implementation
(
"com.google.mlkit:barcode-scanning:17.1.0"
)
implementation
(
"io.ktor:ktor-client-android:2.1.2"
)
implementation
(
"uz.myid.sdk.capture:myid-capture-sdk:2.2.1"
)
}
```
After synchronization, You should be able to access to SDK classes from your source code.
### 1.3 Permissions
Add following lines to the
**_AndroidManifest.xml_**
:
...
...
@@ -207,7 +169,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
`withResolution(value: MyIdResolution)`
| To set a specific camera resolution | MyIdResolution.480
`withResolution(value: MyIdResolution)`
| To set a specific camera resolution | MyIdResolution.
RESOLUTION_
480
`withImageFormat(value: MyIdImageFormat)`
| To set a specific image format | MyIdImageFormat.PNG
`withOrganizationDetails(value: MyIdOrganizationDetails)`
| Custom Organization Details | Optional
`withPhoto(value: Boolean)`
| Return SDK face bitmap | false
...
...
app/build.gradle
View file @
1cff114f
...
...
@@ -37,22 +37,7 @@ android {
}
dependencies
{
implementation
(
files
(
"libs/myid-sdk-2.1.7-release.aar
"
)
)
implementation
(
"com.google.android.material:material: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.2"
implementation
(
"androidx.camera:camera-camera2:$cameraVersion"
)
implementation
(
"androidx.camera:camera-lifecycle:$cameraVersion"
)
implementation
(
"androidx.camera:camera-view:$cameraVersion"
)
implementation
(
"com.google.android.material:material:1.8.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.2.0"
)
implementation
(
"io.ktor:ktor-client-android:2.1.2"
)
implementation
(
"uz.myid.sdk.capture:myid-capture-sdk:2.2.1"
)
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
1cff114f
...
...
@@ -2,9 +2,6 @@
<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"
...
...
settings.gradle
View file @
1cff114f
...
...
@@ -10,7 +10,9 @@ dependencyResolutionManagement {
repositories
{
google
()
mavenCentral
()
maven
{
url
"https://artifactory.aigroup.uz:443/artifactory/myid"
}
}
}
rootProject
.
name
=
"myid-android-sample"
include
":app"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment