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
*
Upgrade Android SDK to 1.0.7.
...
...
README.md
View file @
a15a0baf
...
...
@@ -9,7 +9,7 @@ MyID SDK flutter plugin.
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
Theme
](
#theme
)
Android SDK:
`1.
0.7
`
Android SDK:
`1.
1.0
`
iOS SDK:
`2.2.9`
...
...
android/build.gradle
View file @
a15a0baf
group
"uz.uzinfocom.myid"
version
"1.1.
8
"
version
"1.1.
0
"
buildscript
{
ext
.
kotlin_version
=
"1.7.21"
...
...
@@ -49,5 +49,5 @@ android {
}
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
import
uz.myid.android.sdk.capture.model.MyIdGraphicFieldType
import
uz.myid.android.sdk.capture.model.MyIdImageFormat
import
java.io.ByteArrayOutputStream
import
java.io.IOException
class
MyIdSdkActivityListener
(
private
val
client
:
MyIdClient
...
...
@@ -50,11 +49,11 @@ class MyIdSdkActivityListener(
}
}
override
fun
onError
(
e
:
MyIdException
)
{
override
fun
onError
(
e
xception
:
MyIdException
)
{
if
(
flutterResult
!=
null
)
{
flutterResult
?.
error
(
"error"
,
"${e.code} - ${e.message}"
,
"${e
xception
.code} - ${e
xception
.message}"
,
null
)
flutterResult
=
null
...
...
@@ -80,35 +79,21 @@ class MyIdSdkActivityListener(
):
String
?
{
this
?:
return
null
return
try
{
Base64
.
encodeToString
(
toByteArray
(
format
),
Base64
.
DEFAULT
)
}
catch
(
_
:
Throwable
)
{
null
}
return
Base64
.
encodeToString
(
toByteArray
(
format
),
Base64
.
DEFAULT
)
}
private
fun
Bitmap
.
toByteArray
(
format
:
MyIdImageFormat
,
quality
:
Int
=
100
):
ByteArray
?
{
var
baos
:
ByteArrayOutputStream
?
=
null
return
try
{
val
compressFormat
=
when
(
format
)
{
MyIdImageFormat
.
JPG
->
Bitmap
.
CompressFormat
.
JPEG
MyIdImageFormat
.
PNG
->
Bitmap
.
CompressFormat
.
PNG
}
val
compressFormat
=
when
(
format
)
{
MyIdImageFormat
.
JPG
->
Bitmap
.
CompressFormat
.
JPEG
MyIdImageFormat
.
PNG
->
Bitmap
.
CompressFormat
.
PNG
}
baos
=
ByteArrayOutputStream
()
compress
(
compressFormat
,
quality
,
baos
)
baos
.
toByteArray
()
}
finally
{
if
(
baos
!=
null
)
{
try
{
baos
.
close
()
}
catch
(
e
:
IOException
)
{
e
.
printStackTrace
()
}
}
ByteArrayOutputStream
().
use
{
stream
->
compress
(
compressFormat
,
quality
,
stream
)
return
stream
.
toByteArray
()
}
}
}
\ No newline at end of file
example/pubspec.lock
View file @
a15a0baf
...
...
@@ -121,7 +121,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.
1.8
"
version: "1.
2.0
"
path:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
a15a0baf
name
:
myid
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
repository
:
https://pub.dev/packages/myid
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