From 2fd0a60dd7d795add6f0dc5aad5a9cfb4ab971aa Mon Sep 17 00:00:00 2001 From: andriikuliahin Date: Fri, 1 Mar 2024 15:16:41 +0200 Subject: [PATCH] Updated Android SDK, fixed `email_change` event type declaration --- CHANGELOG.md | 7 +++++++ android/build.gradle | 4 ++-- android/src/main/kotlin/com/keyrico/keyri/KeyriPlugin.kt | 2 +- example/pubspec.yaml | 3 ++- lib/keyri_fingerprint_event.dart | 2 +- pubspec.yaml | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b123a..f5d0109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.7.1 + +- Updated Android SDK + to [4.2.4](https://github.com/Keyri-Co/keyri-android-whitelabel-sdk/releases/tag/4.2.4) +- Fixed `email_change` event declaration +- Fixed proguard rule for `createFingerprint` method + ## 1.7.0 - Updated iOS SDK diff --git a/android/build.gradle b/android/build.gradle index b855028..b32aa19 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -48,8 +48,8 @@ android { dependencies { // Keyri - implementation 'com.keyri:keyrisdk:4.2.3' - implementation 'com.keyri:scanner:4.2.3' + implementation 'com.keyri:keyrisdk:4.2.4' + implementation 'com.keyri:scanner:4.2.4' // Gson implementation 'com.google.code.gson:gson:2.10.1' diff --git a/android/src/main/kotlin/com/keyrico/keyri/KeyriPlugin.kt b/android/src/main/kotlin/com/keyrico/keyri/KeyriPlugin.kt index 2b2ecc9..a539429 100644 --- a/android/src/main/kotlin/com/keyrico/keyri/KeyriPlugin.kt +++ b/android/src/main/kotlin/com/keyrico/keyri/KeyriPlugin.kt @@ -379,7 +379,7 @@ class KeyriPlugin : FlutterPlugin, MethodCallHandler, ActivityAware, logMessage("Keyri sendEvent: eventType must not be null") result.error("sendEvent", "eventType must not be null", null) } else { - val userId = if (publicUserId == null) "ANON" else publicUserId + val userId = publicUserId ?: "ANON" keyri.sendEvent(userId, type, success).onSuccess { eventResponse -> val eventResponse = Gson().toJson(eventResponse) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 250dcd4..a470d2b 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,10 +1,11 @@ name: keyri_example -version: 1.7.0 +version: 1.7.1 description: Demonstrates how to use the Keyri plugin. publish_to: 'none' environment: sdk: ">=3.2.0 <4.0.0" + dependencies: flutter: sdk: flutter diff --git a/lib/keyri_fingerprint_event.dart b/lib/keyri_fingerprint_event.dart index d170f2d..2670e6d 100644 --- a/lib/keyri_fingerprint_event.dart +++ b/lib/keyri_fingerprint_event.dart @@ -23,7 +23,7 @@ class EventType { /// Returns Email change event. static EventType emailChange({Map? metadata}) => - EventType("emailChange", metadata: metadata); + EventType("email_change", metadata: metadata); /// Returns Profile update event. static EventType profileUpdate({Map? metadata}) => diff --git a/pubspec.yaml b/pubspec.yaml index f75f0d7..268a0bb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: keyri_v3 description: Keyri QR Login plugin for Flutter. Provides Keyri SDK capabilities for secure and passwordless login. -version: 1.7.0 +version: 1.7.1 homepage: https://keyri.com environment: