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
ea1a0a25
Commit
ea1a0a25
authored
Jun 20, 2023
by
Javokhir Savriev
Browse files
Published 2.1.7 version
parent
6f699f6a
Changes
9
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
ea1a0a25
...
...
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
## [2.1.7] - 20 Jun, 2023
-
Added new
`withResolution(value: MyIdResolution)`
method for resolution.
-
Added new
`withImageFormat(value: MyIdImageFormat)`
method for image format type.
## [2.1.6] - 12 Apr, 2023
### New features
...
...
README.md
View file @
ea1a0a25
...
...
@@ -51,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.
6
-release.aar"
))
implementation
(
files
(
"libs/myid-sdk-2.1.
7
-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
)
**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.
...
...
@@ -63,7 +63,7 @@ MyID Android SDK also requires following libraries to be added:
```
gradle
dependencies
{
implementation
(
files
(
"libs/myid-sdk-2.1.
6
-release.aar"
))
implementation
(
files
(
"libs/myid-sdk-2.1.
7
-release.aar"
))
implementation
(
"androidx.appcompat:appcompat:1.5.1"
)
implementation
(
"androidx.constraintlayout:constraintlayout:2.1.4"
)
...
...
@@ -129,6 +129,8 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
.
withResidency
(
MyIdResidentType
.
RESIDENT
)
.
withLocale
(
Locale
(
"en"
))
.
withCameraShape
(
MyIdCameraShape
.
CIRCLE
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withOrganizationDetails
(
organizationDetails
)
.
withPhoto
(
false
)
.
build
()
...
...
@@ -175,6 +177,8 @@ class ExampleActivity : AppCompatActivity(), MyIdResultListener {
.
withResidency
(
MyIdResidentType
.
RESIDENT
)
.
withLocale
(
Locale
(
"en"
))
.
withCameraShape
(
MyIdCameraShape
.
CIRCLE
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withOrganizationDetails
(
organizationDetails
)
.
withPhoto
(
false
)
.
build
()
...
...
@@ -203,6 +207,8 @@ 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
`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 @
ea1a0a25
...
...
@@ -37,7 +37,7 @@ android {
}
dependencies
{
implementation
(
files
(
"libs/myid-sdk-2.1.
6
-release.aar"
))
implementation
(
files
(
"libs/myid-sdk-2.1.
7
-release.aar"
))
implementation
(
"androidx.appcompat:appcompat:1.5.1"
)
implementation
(
"androidx.constraintlayout:constraintlayout:2.1.4"
)
...
...
app/libs/myid-sdk-2.1.
6
-release.aar
→
app/libs/myid-sdk-2.1.
7
-release.aar
View file @
ea1a0a25
No preview for this file type
app/src/main/java/uz/myid/sdk/sample/ExampleJavaActivity.java
View file @
ea1a0a25
...
...
@@ -19,7 +19,9 @@ 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.MyIdImageFormat
;
import
uz.myid.android.sdk.capture.model.MyIdResidentType
;
import
uz.myid.android.sdk.capture.model.MyIdResolution
;
public
class
ExampleJavaActivity
extends
AppCompatActivity
implements
MyIdResultListener
{
...
...
@@ -65,6 +67,8 @@ public class ExampleJavaActivity extends AppCompatActivity implements MyIdResult
.
withResidency
(
MyIdResidentType
.
RESIDENT
)
.
withLocale
(
new
Locale
(
"en"
))
.
withCameraShape
(
MyIdCameraShape
.
CIRCLE
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withPhoto
(
false
)
.
build
();
...
...
app/src/main/java/uz/myid/sdk/sample/ExampleJavaFragment.java
View file @
ea1a0a25
...
...
@@ -19,7 +19,9 @@ 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.MyIdImageFormat
;
import
uz.myid.android.sdk.capture.model.MyIdResidentType
;
import
uz.myid.android.sdk.capture.model.MyIdResolution
;
public
class
ExampleJavaFragment
extends
Fragment
implements
MyIdResultListener
{
...
...
@@ -65,6 +67,8 @@ public class ExampleJavaFragment extends Fragment implements MyIdResultListener
.
withResidency
(
MyIdResidentType
.
RESIDENT
)
.
withLocale
(
new
Locale
(
"en"
))
.
withCameraShape
(
MyIdCameraShape
.
CIRCLE
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withPhoto
(
false
)
.
build
();
...
...
app/src/main/java/uz/myid/sdk/sample/ExampleKotlinFragment.kt
View file @
ea1a0a25
...
...
@@ -50,6 +50,8 @@ class ExampleKotlinFragment : Fragment(), MyIdResultListener {
.
withResidency
(
MyIdResidentType
.
RESIDENT
)
.
withLocale
(
Locale
(
"en"
))
.
withCameraShape
(
MyIdCameraShape
.
CIRCLE
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withOrganizationDetails
(
organizationDetails
)
.
withPhoto
(
false
)
.
build
()
...
...
app/src/main/java/uz/myid/sdk/sample/ExampleWithOnActivityResultActivity.kt
View file @
ea1a0a25
...
...
@@ -56,6 +56,8 @@ class ExampleWithOnActivityResultActivity : AppCompatActivity(), MyIdResultListe
.
withResidency
(
MyIdResidentType
.
RESIDENT
)
.
withLocale
(
Locale
(
"en"
))
.
withCameraShape
(
MyIdCameraShape
.
CIRCLE
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withOrganizationDetails
(
organizationDetails
)
.
withPhoto
(
false
)
.
build
()
...
...
app/src/main/java/uz/myid/sdk/sample/MainActivity.kt
View file @
ea1a0a25
...
...
@@ -122,6 +122,8 @@ class MainActivity : AppCompatActivity(), MyIdResultListener {
.
withLocale
(
locale
)
.
withCameraShape
(
shape
)
.
withOrganizationDetails
(
organizationDetails
)
.
withResolution
(
MyIdResolution
.
RESOLUTION_480
)
.
withImageFormat
(
MyIdImageFormat
.
PNG
)
.
withPhoto
(
binding
.
checkboxWithPhoto
.
isChecked
)
.
build
()
...
...
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