Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
3df8dbea
Commit
3df8dbea
authored
8 months ago
by
Javokhir
Browse files
Options
Download
Email Patches
Plain Diff
2.3.4
parent
74708c7b
master
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+5
-1
CHANGELOG.md
README.md
+3
-3
README.md
app/src/main/java/uz/myid/sdk/sample/ExampleJavaFragment.java
+63
-0
...src/main/java/uz/myid/sdk/sample/ExampleJavaFragment.java
app/src/main/java/uz/myid/sdk/sample/ExampleKotlinFragment.kt
+53
-0
...src/main/java/uz/myid/sdk/sample/ExampleKotlinFragment.kt
with
124 additions
and
4 deletions
+124
-4
CHANGELOG.md
View file @
3df8dbea
...
...
@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
## [2.3.4] - 9 Sep, 2024
-
🔨 Resolved Camera static screen: Addressed an issue causing the Camera preview to display a static screen on specific devices.
## [2.3.3] - 12 Jul, 2024
-
Added new
`withDistance(value: Float)`
method to sets the distance for taking photo.
...
...
@@ -16,7 +20,7 @@ All notable changes to this project will be documented in this file.
## [2.3.0] - 9 Apr, 2024
-
🔨 Resolved Camera
X
Preview black screen: Addressed an issue causing the CameraX preview to display a black screen on specific devices.
-
🔨 Resolved Camera Preview black screen: Addressed an issue causing the CameraX preview to display a black screen on specific devices.
## [2.2.8] - 1 Feb, 2024
...
...
This diff is collapsed.
Click to expand it.
README.md
View file @
3df8dbea
...
...
@@ -25,7 +25,7 @@ Make sure that your app meets the following requirements:
-
`minSdkVersion = 21`
-
`targetSdkVersion = 34`
-
`Kotlin = 1.8.
10
+`
-
`Kotlin = 1.8.
22
+`
-
`android.useAndroidX = true`
```
gradle
...
...
@@ -53,7 +53,7 @@ Next, add the SDK dependency to the dependencies block:
```
gradle
dependencies
{
implementation
(
"uz.myid.sdk.capture:myid-capture-sdk:2.3.
3
"
)
implementation
(
"uz.myid.sdk.capture:myid-capture-sdk:2.3.
4
"
)
}
```
...
...
@@ -61,7 +61,7 @@ If you are using Huawei devices, Flutter or an environment that does not support
```
gradle
dependencies
{
implementation
(
"uz.myid.sdk.capture:myid-capture-sdk-bundled:2.3.
3
"
)
implementation
(
"uz.myid.sdk.capture:myid-capture-sdk-bundled:2.3.
6
"
)
}
```
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/uz/myid/sdk/sample/ExampleJavaFragment.java
0 → 100644
View file @
3df8dbea
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.MyIdClient
;
import
uz.myid.android.sdk.capture.MyIdConfig
;
import
uz.myid.android.sdk.capture.MyIdException
;
import
uz.myid.android.sdk.capture.MyIdResult
;
import
uz.myid.android.sdk.capture.MyIdResultListener
;
import
uz.myid.android.sdk.capture.model.MyIdBuildMode
;
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, result code, comparison value
}
@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
clientHash
=
"client_hash"
;
String
clientHashId
=
"client_hash_id"
;
String
passportData
=
"passport_data"
;
String
dateOfBirth
=
"date_of_birth"
;
MyIdConfig
config
=
new
MyIdConfig
.
Builder
(
clientId
)
.
withClientHash
(
clientHash
,
clientHashId
)
.
withPassportData
(
passportData
)
.
withBirthDate
(
dateOfBirth
)
.
withBuildMode
(
MyIdBuildMode
.
PRODUCTION
)
.
build
();
Intent
intent
=
client
.
createIntent
(
requireActivity
(),
config
);
result
.
launch
(
intent
);
}
private
final
ActivityResultLauncher
<
Intent
>
result
=
takeUserResult
(
this
,
this
);
}
This diff is collapsed.
Click to expand it.
app/src/main/java/uz/myid/sdk/sample/ExampleKotlinFragment.kt
0 → 100644
View file @
3df8dbea
package
uz.myid.sdk.sample
import
android.os.Bundle
import
androidx.fragment.app.Fragment
import
uz.myid.android.sdk.capture.MyIdClient
import
uz.myid.android.sdk.capture.MyIdConfig
import
uz.myid.android.sdk.capture.MyIdException
import
uz.myid.android.sdk.capture.MyIdResult
import
uz.myid.android.sdk.capture.MyIdResultListener
import
uz.myid.android.sdk.capture.model.MyIdBuildMode
import
uz.myid.android.sdk.capture.takeUserResult
class
ExampleKotlinFragment
:
Fragment
(),
MyIdResultListener
{
private
val
client
=
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
clientHash
=
"client_hash"
val
clientHashId
=
"client_hash_id"
val
passportData
=
"passport_data"
val
dateOfBirth
=
"date_of_birth"
val
config
=
MyIdConfig
.
Builder
(
clientId
)
.
withClientHash
(
clientHash
,
clientHashId
)
.
withPassportData
(
passportData
)
.
withBirthDate
(
dateOfBirth
)
.
withBuildMode
(
MyIdBuildMode
.
PRODUCTION
)
.
build
()
val
intent
=
client
.
createIntent
(
requireActivity
(),
config
)
result
.
launch
(
intent
)
}
private
val
result
=
takeUserResult
(
this
)
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help