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 Flutter SDK
Commits
a15a0baf
Commit
a15a0baf
authored
Apr 15, 2024
by
Javokhir
Browse files
v1.2.0
parent
4ba650d9
Changes
6
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
a15a0baf
## 1.2.0
*
🔨 Resolved CameraX Preview black screen: Addressed an issue causing the CameraX preview to display a black screen on specific devices.
## 1.1.9
## 1.1.9
*
Upgrade Android SDK to 1.0.7.
*
Upgrade Android SDK to 1.0.7.
...
...
README.md
View file @
a15a0baf
...
@@ -9,7 +9,7 @@ MyID SDK flutter plugin.
...
@@ -9,7 +9,7 @@ MyID SDK flutter plugin.
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
Theme
](
#theme
)
-
[
Theme
](
#theme
)
Android SDK:
`1.
0.7
`
Android SDK:
`1.
1.0
`
iOS SDK:
`2.2.9`
iOS SDK:
`2.2.9`
...
...
android/build.gradle
View file @
a15a0baf
group
"uz.uzinfocom.myid"
group
"uz.uzinfocom.myid"
version
"1.1.
8
"
version
"1.1.
0
"
buildscript
{
buildscript
{
ext
.
kotlin_version
=
"1.7.21"
ext
.
kotlin_version
=
"1.7.21"
...
@@ -49,5 +49,5 @@ android {
...
@@ -49,5 +49,5 @@ android {
}
}
dependencies
{
dependencies
{
implementation
(
"uz.myid.sdk.capture:myid-flutter-capture-sdk:1.
0.7
"
)
implementation
(
"uz.myid.sdk.capture:myid-flutter-capture-sdk:1.
1.0
"
)
}
}
\ No newline at end of file
android/src/main/kotlin/uz/uzinfocom/myid/MyIdSdkActivityListener.kt
View file @
a15a0baf
...
@@ -12,7 +12,6 @@ import uz.myid.android.sdk.capture.MyIdResultListener
...
@@ -12,7 +12,6 @@ import uz.myid.android.sdk.capture.MyIdResultListener
import
uz.myid.android.sdk.capture.model.MyIdGraphicFieldType
import
uz.myid.android.sdk.capture.model.MyIdGraphicFieldType
import
uz.myid.android.sdk.capture.model.MyIdImageFormat
import
uz.myid.android.sdk.capture.model.MyIdImageFormat
import
java.io.ByteArrayOutputStream
import
java.io.ByteArrayOutputStream
import
java.io.IOException
class
MyIdSdkActivityListener
(
class
MyIdSdkActivityListener
(
private
val
client
:
MyIdClient
private
val
client
:
MyIdClient
...
@@ -50,11 +49,11 @@ class MyIdSdkActivityListener(
...
@@ -50,11 +49,11 @@ class MyIdSdkActivityListener(
}
}
}
}
override
fun
onError
(
e
:
MyIdException
)
{
override
fun
onError
(
e
xception
:
MyIdException
)
{
if
(
flutterResult
!=
null
)
{
if
(
flutterResult
!=
null
)
{
flutterResult
?.
error
(
flutterResult
?.
error
(
"error"
,
"error"
,
"${e.code} - ${e.message}"
,
"${e
xception
.code} - ${e
xception
.message}"
,
null
null
)
)
flutterResult
=
null
flutterResult
=
null
...
@@ -80,35 +79,21 @@ class MyIdSdkActivityListener(
...
@@ -80,35 +79,21 @@ class MyIdSdkActivityListener(
):
String
?
{
):
String
?
{
this
?:
return
null
this
?:
return
null
return
try
{
return
Base64
.
encodeToString
(
toByteArray
(
format
),
Base64
.
DEFAULT
)
Base64
.
encodeToString
(
toByteArray
(
format
),
Base64
.
DEFAULT
)
}
catch
(
_
:
Throwable
)
{
null
}
}
}
private
fun
Bitmap
.
toByteArray
(
private
fun
Bitmap
.
toByteArray
(
format
:
MyIdImageFormat
,
format
:
MyIdImageFormat
,
quality
:
Int
=
100
quality
:
Int
=
100
):
ByteArray
?
{
):
ByteArray
?
{
var
baos
:
ByteArrayOutputStream
?
=
null
val
compressFormat
=
when
(
format
)
{
return
try
{
MyIdImageFormat
.
JPG
->
Bitmap
.
CompressFormat
.
JPEG
val
compressFormat
=
when
(
format
)
{
MyIdImageFormat
.
PNG
->
Bitmap
.
CompressFormat
.
PNG
MyIdImageFormat
.
JPG
->
Bitmap
.
CompressFormat
.
JPEG
}
MyIdImageFormat
.
PNG
->
Bitmap
.
CompressFormat
.
PNG
}
baos
=
ByteArrayOutputStream
()
ByteArrayOutputStream
().
use
{
stream
->
compress
(
compressFormat
,
quality
,
baos
)
compress
(
compressFormat
,
quality
,
stream
)
baos
.
toByteArray
()
return
stream
.
toByteArray
()
}
finally
{
if
(
baos
!=
null
)
{
try
{
baos
.
close
()
}
catch
(
e
:
IOException
)
{
e
.
printStackTrace
()
}
}
}
}
}
}
}
}
\ No newline at end of file
example/pubspec.lock
View file @
a15a0baf
...
@@ -121,7 +121,7 @@ packages:
...
@@ -121,7 +121,7 @@ packages:
path: ".."
path: ".."
relative: true
relative: true
source: path
source: path
version: "1.
1.8
"
version: "1.
2.0
"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
...
...
pubspec.yaml
View file @
a15a0baf
name
:
myid
name
:
myid
description
:
MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity.
description
:
MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity.
version
:
1.
1.9
version
:
1.
2.0
homepage
:
https://pub.dev/packages/myid
homepage
:
https://pub.dev/packages/myid
repository
:
https://pub.dev/packages/myid
repository
:
https://pub.dev/packages/myid
issue_tracker
:
https://gitlab.myid.uz/myid-public-code/myid-sample-flutter/-/issues
issue_tracker
:
https://gitlab.myid.uz/myid-public-code/myid-sample-flutter/-/issues
...
...
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