6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 9f0f422d
Changed files
comwell_key_app/android/app/build.gradle | 43 +- .../android/app/src/main/AndroidManifest.xml | 7 +- .../com/assa/comwell_key_app/MainActivity.kt | 5 - .../kotlin/com/comwell/phoenix/MainActivity.kt | 5 + comwell_key_app/android/build.gradle | 2 +- comwell_key_app/assets/translations/en-US.json | 12 + comwell_key_app/assets/translations/en.json | 12 - .../ios/Runner.xcodeproj/project.pbxproj | 26 +- .../xcshareddata/xcschemes/Test-Debug.xcscheme | 67 -- .../xcshareddata/xcschemes/Test-Release.xcscheme | 78 -- .../xcshareddata/xcschemes/TestDebug.xcscheme | 67 ++ .../xcshareddata/xcschemes/TestRelease.xcscheme | 78 ++ comwell_key_app/lib/welcome/welcome_page.dart | 4 +- .../lib/welcome/welcome_repository.dart | 9 +- comwell_key_app/macos/Podfile.lock | 36 + .../macos/Runner.xcodeproj/project.pbxproj | 98 +- .../Runner.xcworkspace/contents.xcworkspacedata | 3 + comwell_key_app/pubspec.yaml | 1 + mobilekeys_sdk_plugin/android/.gitignore | 12 - .../android/.gradle/7.5/checksums/checksums.lock | Bin 0 -> 17 bytes .../dependencies-accessors.lock | Bin 0 -> 17 bytes .../7.5/dependencies-accessors/gc.properties | 0 .../android/.gradle/7.5/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../android/.gradle/7.5/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .../android/.gradle/7.5/gc.properties | 0 .../buildOutputCleanup/buildOutputCleanup.lock | Bin 0 -> 17 bytes .../.gradle/buildOutputCleanup/cache.properties | 2 + .../android/.gradle/vcs-1/gc.properties | 0 mobilekeys_sdk_plugin/android/build.gradle | 11 +- .../libs/mobilekeys-android-sdk-debug-8.0.7.aar | Bin 1642844 -> 0 bytes .../libs/mobilekeys-android-sdk-debug-8.1.0.aar | Bin 0 -> 4333160 bytes .../libs/mobilekeys-android-sdk-release-8.0.7.aar | Bin 1600847 -> 0 bytes .../libs/mobilekeys-android-sdk-release-8.1.0.aar | Bin 0 -> 4394625 bytes .../android/src/main/assets/logback.xml | 41 + .../seos_mobile_keys_plugin/AppUsage.kt | 1144 ++++++++++++++++++++ .../seos_mobile_keys_plugin/ClosestLockTrigger.kt | 45 +- .../SeosMobileKeysPlugin.kt | 10 +- 37 files changed, 1603 insertions(+), 215 deletions(-)
Diff
diff --git a/comwell_key_app/android/app/build.gradle b/comwell_key_app/android/app/build.gradle
index 2b7beaf9..c7172733 100644
--- a/comwell_key_app/android/app/build.gradle
+++ b/comwell_key_app/android/app/build.gradle
@@ -40,13 +40,14 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.assa.com"
+ applicationId "com.comwell.phoenix"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
+ multiDexEnabled true
}
buildTypes {
@@ -56,12 +57,41 @@ android {
signingConfig signingConfigs.debug
}
debug {
- minifyEnabled true
+ /* minifyEnabled true
shrinkResources true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), "proguard.cfg"
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), "proguard.cfg" */
}
}
- namespace 'com.assaabloy.com'
+ flavorDimensions += "env"
+ namespace 'com.comwell.phoenix'
+ productFlavors{
+ Develop {
+ dimension = "env"
+ resValue "string", "app_name", "CP Dev"
+ applicationIdSuffix = ".dev"
+ }
+ TestDebug {
+ dimension = "env"
+ resValue "string", "app_name", "CP Test"
+ applicationIdSuffix = ".test"
+ }
+ TestRelease {
+ dimension = "env"
+ resValue "string", "app_name", "CP Test"
+ applicationIdSuffix = ".test"
+ }
+ Stage {
+ dimension = "env"
+ resValue "string", "app_name", "CP Stage"
+ applicationIdSuffix = ".stage"
+ }
+ "Prod" {
+ dimension = "env"
+ resValue "string", "app_name", "Comwell Phoenix"
+ }
+ }
+
+
}
flutter {
@@ -71,8 +101,7 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//aar file from libs dir. Name and version is from the filename.
- debugImplementation files('../../../mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.0.7.aar')
- releaseImplementation files('../../../android/libs/libs/mobilekeys-android-sdk-release-8.0.7.aar')
+ debugImplementation fileTree(dir: '../../../android/libs', include: ['mobilekeys-android-sdk-debug-*.aar'])
+ releaseImplementation fileTree(dir: '../../../android/libs', include: ['mobilekeys-android-sdk-release-*.aar'])
debugImplementation 'com.github.tony19:logback-android:3.0.0'
-
}
diff --git a/comwell_key_app/android/app/src/main/AndroidManifest.xml b/comwell_key_app/android/app/src/main/AndroidManifest.xml
index d9a4095e..a5a3918a 100644
--- a/comwell_key_app/android/app/src/main/AndroidManifest.xml
+++ b/comwell_key_app/android/app/src/main/AndroidManifest.xml
@@ -1,8 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
-
+ <uses-feature
+ android:name="android.hardware.nfc.hce"
+ android:required="false"/>
+
<application
- android:label="comwell_key_app"
+ android:label="@string/app_name"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
diff --git a/comwell_key_app/android/app/src/main/kotlin/com/assa/comwell_key_app/MainActivity.kt b/comwell_key_app/android/app/src/main/kotlin/com/assa/comwell_key_app/MainActivity.kt
deleted file mode 100644
index ce543d7f..00000000
--- a/comwell_key_app/android/app/src/main/kotlin/com/assa/comwell_key_app/MainActivity.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.assa.comwell_key_app
-
-import io.flutter.embedding.android.FlutterActivity
-
-class MainActivity: FlutterActivity()
diff --git a/comwell_key_app/android/app/src/main/kotlin/com/comwell/phoenix/MainActivity.kt b/comwell_key_app/android/app/src/main/kotlin/com/comwell/phoenix/MainActivity.kt
new file mode 100644
index 00000000..3c976e41
--- /dev/null
+++ b/comwell_key_app/android/app/src/main/kotlin/com/comwell/phoenix/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.comwell.phoenix
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity()
diff --git a/comwell_key_app/android/build.gradle b/comwell_key_app/android/build.gradle
index 93578f17..7fe1bd16 100644
--- a/comwell_key_app/android/build.gradle
+++ b/comwell_key_app/android/build.gradle
@@ -9,7 +9,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.android.tools:r8:8.1.72"
- classpath files('libs/mobilekeys-android-sdk-debug-8.0.7.aar')
+ classpath files('libs/mobilekeys-android-sdk-debug-8.1.0.aar')
}
}
diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
new file mode 100644
index 00000000..4cec2653
--- /dev/null
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -0,0 +1,12 @@
+{
+ "welcome_headline": "Welcome at Comwell Hotels",
+ "welcome_button": "Continue",
+ "welcome_error": "An error occurred. Please try again later.",
+ "room_key": "Room key",
+ "room_keys": "Room keys",
+ "redeem_code": "Redeem code",
+ "hold_phone_to_door": "Hold your phone to the door",
+ "error_opening_door": "An error occurred",
+ "try_again": "Try again",
+ "room_key_description": "This is your room key"
+}
\ No newline at end of file
diff --git a/comwell_key_app/assets/translations/en.json b/comwell_key_app/assets/translations/en.json
deleted file mode 100644
index 4cec2653..00000000
--- a/comwell_key_app/assets/translations/en.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "welcome_headline": "Welcome at Comwell Hotels",
- "welcome_button": "Continue",
- "welcome_error": "An error occurred. Please try again later.",
- "room_key": "Room key",
- "room_keys": "Room keys",
- "redeem_code": "Redeem code",
- "hold_phone_to_door": "Hold your phone to the door",
- "error_opening_door": "An error occurred",
- "try_again": "Try again",
- "room_key_description": "This is your room key"
-}
\ No newline at end of file
diff --git a/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj b/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
index c49cf368..2d609534 100644
--- a/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
+++ b/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 54;
+ objectVersion = 60;
objects = {
/* Begin PBXBuildFile section */
@@ -516,7 +516,7 @@
};
name = "Debug-Develop";
};
- 6073D2A92C58F8F500183654 /* Release-Test-Release */ = {
+ 6073D2A92C58F8F500183654 /* Release-TestRelease */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -566,9 +566,9 @@
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
- name = "Release-Test-Release";
+ name = "Release-TestRelease";
};
- 6073D2AA2C58F8F500183654 /* Release-Test-Release */ = {
+ 6073D2AA2C58F8F500183654 /* Release-TestRelease */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
@@ -589,7 +589,7 @@
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
- name = "Release-Test-Release";
+ name = "Release-TestRelease";
};
6073D2AB2C58F90300183654 /* Release-Stage */ = {
isa = XCBuildConfiguration;
@@ -741,7 +741,7 @@
};
name = "Release-Prod";
};
- 6073D2BD2C59042900183654 /* Debug-Test-Debug */ = {
+ 6073D2BD2C59042900183654 /* Debug-TestDebug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -794,9 +794,9 @@
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
- name = "Debug-Test-Debug";
+ name = "Debug-TestDebug";
};
- 6073D2BE2C59042900183654 /* Debug-Test-Debug */ = {
+ 6073D2BE2C59042900183654 /* Debug-TestDebug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
@@ -817,7 +817,7 @@
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
- name = "Debug-Test-Debug";
+ name = "Debug-TestDebug";
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
@@ -979,12 +979,12 @@
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
- 6073D2BD2C59042900183654 /* Debug-Test-Debug */,
+ 6073D2BD2C59042900183654 /* Debug-TestDebug */,
6073D2A72C58F8E600183654 /* Debug-Develop */,
97C147041CF9000F007C117D /* Release */,
6073D2AD2C58F91500183654 /* Release-Prod */,
6073D2AB2C58F90300183654 /* Release-Stage */,
- 6073D2A92C58F8F500183654 /* Release-Test-Release */,
+ 6073D2A92C58F8F500183654 /* Release-TestRelease */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
@@ -994,12 +994,12 @@
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
- 6073D2BE2C59042900183654 /* Debug-Test-Debug */,
+ 6073D2BE2C59042900183654 /* Debug-TestDebug */,
6073D2A82C58F8E600183654 /* Debug-Develop */,
97C147071CF9000F007C117D /* Release */,
6073D2AE2C58F91500183654 /* Release-Prod */,
6073D2AC2C58F90300183654 /* Release-Stage */,
- 6073D2AA2C58F8F500183654 /* Release-Test-Release */,
+ 6073D2AA2C58F8F500183654 /* Release-TestRelease */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Test-Debug.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Test-Debug.xcscheme
deleted file mode 100644
index 3b96abcf..00000000
--- a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Test-Debug.xcscheme
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "1540"
- version = "1.7">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES"
- buildArchitectures = "Automatic">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- shouldAutocreateTestPlan = "YES">
- </TestAction>
- <LaunchAction
- buildConfiguration = "Debug-Test-Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES">
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Release"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Test-Release.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Test-Release.xcscheme
deleted file mode 100644
index 3e6257b0..00000000
--- a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Test-Release.xcscheme
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "1540"
- version = "1.7">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES"
- buildArchitectures = "Automatic">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- shouldAutocreateTestPlan = "YES">
- </TestAction>
- <LaunchAction
- buildConfiguration = "Release-Test-Release"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Release"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release-Test-Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/TestDebug.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/TestDebug.xcscheme
new file mode 100644
index 00000000..3b96abcf
--- /dev/null
+++ b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/TestDebug.xcscheme
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1540"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES"
+ buildArchitectures = "Automatic">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ shouldAutocreateTestPlan = "YES">
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug-Test-Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/TestRelease.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/TestRelease.xcscheme
new file mode 100644
index 00000000..d6039874
--- /dev/null
+++ b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/TestRelease.xcscheme
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1540"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES"
+ buildArchitectures = "Automatic">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ shouldAutocreateTestPlan = "YES">
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Release-TestRelease"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release-TestRelease"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/comwell_key_app/lib/welcome/welcome_page.dart b/comwell_key_app/lib/welcome/welcome_page.dart
index 9729705a..da18fe7a 100644
--- a/comwell_key_app/lib/welcome/welcome_page.dart
+++ b/comwell_key_app/lib/welcome/welcome_page.dart
@@ -16,7 +16,7 @@ class WelcomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocConsumer<WelcomeBloc, WelcomeState>(listener: (context, state) {
- if (state.status == WelcomeStatus.setupError) {
+ /* if (state.status == WelcomeStatus.setupError) {
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(SnackBar(
@@ -24,7 +24,7 @@ class WelcomePage extends StatelessWidget {
'welcome_error'.tr(),
),
));
- }
+ } */
}, builder: (context, state) {
if (state.status == WelcomeStatus.unknown) {
context.read<WelcomeBloc>().add(WelcomeSetupStarted());
diff --git a/comwell_key_app/lib/welcome/welcome_repository.dart b/comwell_key_app/lib/welcome/welcome_repository.dart
index 88961933..5be5e08a 100644
--- a/comwell_key_app/lib/welcome/welcome_repository.dart
+++ b/comwell_key_app/lib/welcome/welcome_repository.dart
@@ -15,12 +15,19 @@ final _secureStorage = SecureStorage();
Future<bool> startMobilePlugin() async {
- final mobileKeysOptions = {
+ /* final mobileKeysOptions = {
"MobileKeysOptionApplicationId": dotenv.env['MOBILEKEYSOPTIONAPPLICATIONID'],
"MobileKeysOptionAppDescription": dotenv.env['MOBILEKEYSOPTIONAPPDESCRIPTION'],
"MobileKeysOptionVersion": dotenv.env['MOBILEKEYSOPTIONVERSION'],
"MobileKeysOptionLockServiceCodes": dotenv.env['MOBILEKEYSOPTIONLOCKSERVICECODES'],
"MobileKeysOptionLogsMail": dotenv.env['MOBILEKEYSOPTIONLOGSMAIL'],
+ }; */
+ final mobileKeysOptions = {
+ "MobileKeysOptionApplicationId": "Flutter Sample",
+ "MobileKeysOptionAppDescription": "ASSA ABLOY Mobile Keys Example Implementation",
+ "MobileKeysOptionVersion": "0.0.1",
+ "MobileKeysOptionLockServiceCodes": [1, 2],
+ "MobileKeysOptionLogsMail": "my.mail@mail.com",
};
try {
await _seosMobileKeysPlugin.startUp(mobileKeysOptions);
diff --git a/comwell_key_app/macos/Podfile.lock b/comwell_key_app/macos/Podfile.lock
new file mode 100644
index 00000000..19686394
--- /dev/null
+++ b/comwell_key_app/macos/Podfile.lock
@@ -0,0 +1,36 @@
+PODS:
+ - flutter_secure_storage_macos (6.1.1):
+ - FlutterMacOS
+ - FlutterMacOS (1.0.0)
+ - path_provider_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - shared_preferences_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+
+DEPENDENCIES:
+ - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
+ - FlutterMacOS (from `Flutter/ephemeral`)
+ - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
+ - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
+
+EXTERNAL SOURCES:
+ flutter_secure_storage_macos:
+ :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
+ FlutterMacOS:
+ :path: Flutter/ephemeral
+ path_provider_foundation:
+ :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
+ shared_preferences_foundation:
+ :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
+
+SPEC CHECKSUMS:
+ flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
+ FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
+ path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
+ shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
+
+PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
+
+COCOAPODS: 1.15.2
diff --git a/comwell_key_app/macos/Runner.xcodeproj/project.pbxproj b/comwell_key_app/macos/Runner.xcodeproj/project.pbxproj
index b087efd7..2090583c 100644
--- a/comwell_key_app/macos/Runner.xcodeproj/project.pbxproj
+++ b/comwell_key_app/macos/Runner.xcodeproj/project.pbxproj
@@ -27,6 +27,8 @@
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
+ 43E9E24DC141B7957FF75EDA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8268AD545049DB30C785FD2A /* Pods_Runner.framework */; };
+ 8F1B64E5B160303EA2280666 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A329BEAB0A42B15D85E68CD8 /* Pods_RunnerTests.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -64,7 +66,7 @@
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
- 33CC10ED2044A3C60003C045 /* comwell_key_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "comwell_key_app.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 33CC10ED2044A3C60003C045 /* comwell_key_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = comwell_key_app.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@@ -76,8 +78,16 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
+ 46BD0F1D53FEF148CD481393 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
+ 5D45E7C8DEFAD97B54A83485 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
+ 5D716E5B39C2E984EAA2C84E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
+ 6A233FEF47944AAA5CD69376 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
+ 6DDE19A99AE180266FD058B5 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
+ 8268AD545049DB30C785FD2A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 84C269F42F4F9C0E8163B705 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
+ A329BEAB0A42B15D85E68CD8 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -85,6 +95,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 8F1B64E5B160303EA2280666 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -92,6 +103,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 43E9E24DC141B7957FF75EDA /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -125,6 +137,7 @@
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
+ F826F69D6915EB74B68D4A45 /* Pods */,
);
sourceTree = "<group>";
};
@@ -175,10 +188,26 @@
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 8268AD545049DB30C785FD2A /* Pods_Runner.framework */,
+ A329BEAB0A42B15D85E68CD8 /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
+ F826F69D6915EB74B68D4A45 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 5D716E5B39C2E984EAA2C84E /* Pods-Runner.debug.xcconfig */,
+ 5D45E7C8DEFAD97B54A83485 /* Pods-Runner.release.xcconfig */,
+ 6A233FEF47944AAA5CD69376 /* Pods-Runner.profile.xcconfig */,
+ 84C269F42F4F9C0E8163B705 /* Pods-RunnerTests.debug.xcconfig */,
+ 6DDE19A99AE180266FD058B5 /* Pods-RunnerTests.release.xcconfig */,
+ 46BD0F1D53FEF148CD481393 /* Pods-RunnerTests.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -186,6 +215,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
+ 03D216593A0CCD1D54EC288F /* [CP] Check Pods Manifest.lock */,
331C80D1294CF70F00263BE5 /* Sources */,
331C80D2294CF70F00263BE5 /* Frameworks */,
331C80D3294CF70F00263BE5 /* Resources */,
@@ -204,11 +234,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
+ 9723AE6F467DFA1417C83F7C /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
+ 263ED8563F3EF021AEBA4589 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -291,6 +323,45 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 03D216593A0CCD1D54EC288F /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 263ED8563F3EF021AEBA4589 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -329,6 +400,28 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
+ 9723AE6F467DFA1417C83F7C /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -380,6 +473,7 @@
/* Begin XCBuildConfiguration section */
331C80DB294CF71000263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 84C269F42F4F9C0E8163B705 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -394,6 +488,7 @@
};
331C80DC294CF71000263BE5 /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 6DDE19A99AE180266FD058B5 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
@@ -408,6 +503,7 @@
};
331C80DD294CF71000263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 46BD0F1D53FEF148CD481393 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
diff --git a/comwell_key_app/macos/Runner.xcworkspace/contents.xcworkspacedata b/comwell_key_app/macos/Runner.xcworkspace/contents.xcworkspacedata
index 1d526a16..21a3cc14 100644
--- a/comwell_key_app/macos/Runner.xcworkspace/contents.xcworkspacedata
+++ b/comwell_key_app/macos/Runner.xcworkspace/contents.xcworkspacedata
@@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
+ <FileRef
+ location = "group:Pods/Pods.xcodeproj">
+ </FileRef>
</Workspace>
diff --git a/comwell_key_app/pubspec.yaml b/comwell_key_app/pubspec.yaml
index 24d9cf85..91139083 100644
--- a/comwell_key_app/pubspec.yaml
+++ b/comwell_key_app/pubspec.yaml
@@ -51,6 +51,7 @@ dev_dependencies:
# rules and activating additional ones.
flutter_lints: ^3.0.0
build_runner: ^2.4.11
+ change_app_package_name: ^1.3.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
diff --git a/mobilekeys_sdk_plugin/android/.gitignore b/mobilekeys_sdk_plugin/android/.gitignore
deleted file mode 100644
index 52cc0b19..00000000
--- a/mobilekeys_sdk_plugin/android/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-.cxx
-
-# Project related
-src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/AppUsage.kt
\ No newline at end of file
diff --git a/mobilekeys_sdk_plugin/android/.gradle/7.5/checksums/checksums.lock b/mobilekeys_sdk_plugin/android/.gradle/7.5/checksums/checksums.lock
new file mode 100644
index 00000000..303600aa
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/.gradle/7.5/checksums/checksums.lock differ
diff --git a/mobilekeys_sdk_plugin/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock b/mobilekeys_sdk_plugin/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock
new file mode 100644
index 00000000..dc4c47b6
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock differ
diff --git a/mobilekeys_sdk_plugin/android/.gradle/7.5/dependencies-accessors/gc.properties b/mobilekeys_sdk_plugin/android/.gradle/7.5/dependencies-accessors/gc.properties
new file mode 100644
index 00000000..e69de29b
diff --git a/mobilekeys_sdk_plugin/android/.gradle/7.5/fileChanges/last-build.bin b/mobilekeys_sdk_plugin/android/.gradle/7.5/fileChanges/last-build.bin
new file mode 100644
index 00000000..f76dd238
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/.gradle/7.5/fileChanges/last-build.bin differ
diff --git a/mobilekeys_sdk_plugin/android/.gradle/7.5/fileHashes/fileHashes.lock b/mobilekeys_sdk_plugin/android/.gradle/7.5/fileHashes/fileHashes.lock
new file mode 100644
index 00000000..5aaa5fc7
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/.gradle/7.5/fileHashes/fileHashes.lock differ
diff --git a/mobilekeys_sdk_plugin/android/.gradle/7.5/gc.properties b/mobilekeys_sdk_plugin/android/.gradle/7.5/gc.properties
new file mode 100644
index 00000000..e69de29b
diff --git a/mobilekeys_sdk_plugin/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/mobilekeys_sdk_plugin/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 00000000..125ec01d
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/mobilekeys_sdk_plugin/android/.gradle/buildOutputCleanup/cache.properties b/mobilekeys_sdk_plugin/android/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 00000000..d4c30983
--- /dev/null
+++ b/mobilekeys_sdk_plugin/android/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Tue Jul 30 13:28:26 CEST 2024
+gradle.version=7.5
diff --git a/mobilekeys_sdk_plugin/android/.gradle/vcs-1/gc.properties b/mobilekeys_sdk_plugin/android/.gradle/vcs-1/gc.properties
new file mode 100644
index 00000000..e69de29b
diff --git a/mobilekeys_sdk_plugin/android/build.gradle b/mobilekeys_sdk_plugin/android/build.gradle
index fc52d945..616c90cb 100644
--- a/mobilekeys_sdk_plugin/android/build.gradle
+++ b/mobilekeys_sdk_plugin/android/build.gradle
@@ -28,14 +28,14 @@ android {
}
defaultConfig {
- minSdkVersion 21
+ minSdkVersion 28
}
namespace 'com.assaabloy.flutter.seosmobilekeyssdk.seos_mobile_keys_plugin'
}
dependencies {
- compileOnly files('libs/mobilekeys-android-sdk-debug-8.0.7.aar')
- compileOnly files('libs/mobilekeys-android-sdk-release-8.0.7.aar')
+ //compileOnly fileTree(dir: 'libs', include: ['mobilekeys-android-sdk-release-*.aar'])
+ compileOnly fileTree(dir: 'libs', include: ['mobilekeys-android-sdk-debug-*.aar'])
// Mobile Keys SDK transitive dependencies
implementation "org.bouncycastle:bcprov-jdk15on:1.69"
@@ -44,9 +44,4 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:4.12.0"
implementation "androidx.security:security-crypto:1.1.0-alpha06"
- //Google support libraries
- implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'androidx.core:core-ktx:1.6.0'
- implementation 'androidx.core:core:1.7.0'
-
}
\ No newline at end of file
diff --git a/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.0.7.aar b/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.0.7.aar
deleted file mode 100644
index 102cf382..00000000
Binary files a/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.0.7.aar and /dev/null differ
diff --git a/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.1.0.aar b/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.1.0.aar
new file mode 100644
index 00000000..837d5a7f
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-debug-8.1.0.aar differ
diff --git a/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-release-8.0.7.aar b/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-release-8.0.7.aar
deleted file mode 100644
index 6e11d845..00000000
Binary files a/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-release-8.0.7.aar and /dev/null differ
diff --git a/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-release-8.1.0.aar b/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-release-8.1.0.aar
new file mode 100644
index 00000000..fa823585
Binary files /dev/null and b/mobilekeys_sdk_plugin/android/libs/mobilekeys-android-sdk-release-8.1.0.aar differ
diff --git a/mobilekeys_sdk_plugin/android/src/main/assets/logback.xml b/mobilekeys_sdk_plugin/android/src/main/assets/logback.xml
new file mode 100644
index 00000000..da813716
--- /dev/null
+++ b/mobilekeys_sdk_plugin/android/src/main/assets/logback.xml
@@ -0,0 +1,41 @@
+<configuration>
+ <!-- Create a file appender for a log in the application's data directory -->
+ <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${DATA_DIR}/logback_log.log</file>
+ <encoder>
+ <pattern>%date|%-5level [%thread]: %logger{25}[%line] - %msg%n</pattern>
+ </encoder>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!-- daily rollover period -->
+ <fileNamePattern>${DATA_DIR}/logback_log.%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
+
+ <!-- size based rollover trigger -->
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>1MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+
+ <!-- keep 7 days' worth of history -->
+ <maxHistory>7</maxHistory>
+ <totalSizeCap>10MB</totalSizeCap>
+ </rollingPolicy>
+
+ </appender>
+
+ <!-- log to normal LogCat -->
+ <appender name="LOGCAT" class="ch.qos.logback.classic.android.LogcatAppender">
+ <tagEncoder>
+ <pattern>%logger{12}</pattern>
+ </tagEncoder>
+ <encoder>
+ <pattern>%line: %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <!-- Write DEBUG (and higher-level) messages to the log -->
+ <root level="TRACE">
+ <appender-ref ref="file" />
+ <appender-ref ref="LOGCAT" />
+ </root>
+
+</configuration>
\ No newline at end of file
diff --git a/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/AppUsage.kt b/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/AppUsage.kt
new file mode 100644
index 00000000..a8f0eb4f
--- /dev/null
+++ b/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/AppUsage.kt
@@ -0,0 +1,1144 @@
+// Autogenerated from Pigeon (v17.3.0), do not edit directly.
+// See also: https://pub.dev/packages/pigeon
+
+package com.assaabloy.flutter.seosmobilekeyssdk.seos_mobile_keys_plugin
+
+import android.util.Log
+import io.flutter.plugin.common.BasicMessageChannel
+import io.flutter.plugin.common.BinaryMessenger
+import io.flutter.plugin.common.MessageCodec
+import io.flutter.plugin.common.StandardMessageCodec
+import java.io.ByteArrayOutputStream
+import java.nio.ByteBuffer
+
+private fun wrapResult(result: Any?): List<Any?> {
+ return listOf(result)
+}
+
+private fun wrapError(exception: Throwable): List<Any?> {
+ if (exception is FlutterError) {
+ return listOf(
+ exception.code,
+ exception.message,
+ exception.details
+ )
+ } else {
+ return listOf(
+ exception.javaClass.simpleName,
+ exception.toString(),
+ "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception)
+ )
+ }
+}
+
+/**
+ * Error class for passing custom error details to Flutter via a thrown PlatformException.
+ * @property code The error code.
+ * @property message The error message.
+ * @property details The error details. Must be a datatype supported by the api codec.
+ */
+class FlutterError (
+ val code: String,
+ override val message: String? = null,
+ val details: Any? = null
+) : Throwable()
+
+enum class MobileKeysScanMode(val raw: Int) {
+ OPTIMIZE_PERFORMANCE(0),
+ OPTIMIZE_POWER_CONSUMPTION(1);
+
+ companion object {
+ fun ofRaw(raw: Int): MobileKeysScanMode? {
+ return values().firstOrNull { it.raw == raw }
+ }
+ }
+}
+
+enum class OpeningType(val raw: Int) {
+ UNKNOWN(0),
+ PROXIMITY(1),
+ MOTION(2),
+ SEAMLESS(3),
+ APPLICATION_SPECIFIC(4),
+ ENHANCED_TAP(5);
+
+ companion object {
+ fun ofRaw(raw: Int): OpeningType? {
+ return values().firstOrNull { it.raw == raw }
+ }
+ }
+}
+
+enum class MobileKeysInfoType(val raw: Int) {
+ /** Bluetooth services is not authorized by user. Recommended user action is to change permissions. */
+ BLE_NOT_SUPPORTED(0),
+ /** Bluetooth services is not authorized by this device. Recommended user action is to change device. */
+ BLE_TURNED_OFF(1),
+ /** Location services is not enabled in app project settings. Recommended developer action is to change project settings. */
+ LOCATION_SERVICES_NOT_ENABLED(2),
+ /** Location services authorization is not determined by user. Recommended developer action is to call requestAlwaysAuthorization. */
+ LOCATION_SERVICES_NOT_DETERMINED(3),
+ /** Location services is not authorized by user. Recommended user action is to change permissions. */
+ LOCATION_SERVICES_TURNED_OFF(4),
+ /** CLBeaconRegion monitoring or ranging is not supported by this device. Recommended user action is to change device. */
+ LOCATION_MONITORING_NOT_SUPPORTED(5),
+ /** CLBeaconRegion monitoring or ranging is not authorized by the user. Recommended user action is to change permissions. */
+ LOCATION_MONITORING_TURNED_OFF(6),
+ /** Passcode may be turned off. This cannot be verified 100% reliably, but this could be an indication that the phone is not protected by a password. */
+ PASSCODE_WARNING(7),
+ /** Bluetooth sharing authorization for BLE Peripheral mode has not been granted. This should only happen when using Enhanced Tap. Recommended user action is to go to App System Settings and enable Bluetooth Sharing. */
+ BLE_SHARING_TURNED_OFF(8);
+
+ companion object {
+ fun ofRaw(raw: Int): MobileKeysInfoType? {
+ return values().firstOrNull { it.raw == raw }
+ }
+ }
+}
+
+enum class MobileKeysEnvironmentType(val raw: Int) {
+ PROD(0),
+ DEMO(1),
+ TEST(2),
+ DEV(3),
+ LOCAL(4),
+ STAGING(5),
+ ACCEPTANCE(6),
+ UNKNOWN(7);
+
+ companion object {
+ fun ofRaw(raw: Int): MobileKeysEnvironmentType? {
+ return values().firstOrNull { it.raw == raw }
+ }
+ }
+}
+
+enum class MobileKeysReaderType(val raw: Int) {
+ BLE_PERIPHERAL(0),
+ BLE_CENTRAL(1),
+ HTTP_REST(2);
+
+ companion object {
+ fun ofRaw(raw: Int): MobileKeysReaderType? {
+ return values().firstOrNull { it.raw == raw }
+ }
+ }
+}
+
+enum class BleProtocol(val raw: Int) {
+ LEGACY(0),
+ V1(1),
+ UNKNOWN(2);
+
+ companion object {
+ fun ofRaw(raw: Int): BleProtocol? {
+ return values().firstOrNull { it.raw == raw }
+ }
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysOpeningType (
+ val openingType: OpeningType
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysOpeningType {
+ val openingType = OpeningType.ofRaw(list[0] as Int)!!
+ return MobileKeysOpeningType(openingType)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ openingType.raw,
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class DataTypeDate (
+ val date: String,
+ val format: String
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): DataTypeDate {
+ val date = list[0] as String
+ val format = list[1] as String
+ return DataTypeDate(date, format)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ date,
+ format,
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysKey (
+ val credentialType: Long,
+ val beginDate: DataTypeDate? = null,
+ val endDate: DataTypeDate? = null,
+ val keyId: String? = null,
+ val externalId: String? = null,
+ val label: String? = null,
+ val configUrl: String? = null,
+ val readbackUrl: String? = null,
+ val issuer: String? = null,
+ val keyType: String? = null,
+ val cardNumber: String? = null,
+ val active: Boolean
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysKey {
+ val credentialType = list[0].let { if (it is Int) it.toLong() else it as Long }
+ val beginDate: DataTypeDate? = (list[1] as List<Any?>?)?.let {
+ DataTypeDate.fromList(it)
+ }
+ val endDate: DataTypeDate? = (list[2] as List<Any?>?)?.let {
+ DataTypeDate.fromList(it)
+ }
+ val keyId = list[3] as String?
+ val externalId = list[4] as String?
+ val label = list[5] as String?
+ val configUrl = list[6] as String?
+ val readbackUrl = list[7] as String?
+ val issuer = list[8] as String?
+ val keyType = list[9] as String?
+ val cardNumber = list[10] as String?
+ val active = list[11] as Boolean
+ return MobileKeysKey(credentialType, beginDate, endDate, keyId, externalId, label, configUrl, readbackUrl, issuer, keyType, cardNumber, active)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ credentialType,
+ beginDate?.toList(),
+ endDate?.toList(),
+ keyId,
+ externalId,
+ label,
+ configUrl,
+ readbackUrl,
+ issuer,
+ keyType,
+ cardNumber,
+ active,
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysEndpointInfo (
+ val endpointId: Long,
+ val environmentType: MobileKeysEnvironmentType,
+ val seosAppletVersion: String,
+ val fileSystemAppletVersion: String,
+ val toolsAppletVersion: String,
+ val javaCardVersion: String,
+ val optionFlags: String,
+ val allocatedFileSystemSize: Long,
+ val currentTopOfFileSystem: Long,
+ val snmpBufferSize: Long,
+ val remainingEPROMSize: Long,
+ val remainingTransientObjectSpace: Long,
+ val hashAlg: Long? = null,
+ val encAlg: Long? = null,
+ val lastServerSyncDate: DataTypeDate? = null
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysEndpointInfo {
+ val endpointId = list[0].let { if (it is Int) it.toLong() else it as Long }
+ val environmentType = MobileKeysEnvironmentType.ofRaw(list[1] as Int)!!
+ val seosAppletVersion = list[2] as String
+ val fileSystemAppletVersion = list[3] as String
+ val toolsAppletVersion = list[4] as String
+ val javaCardVersion = list[5] as String
+ val optionFlags = list[6] as String
+ val allocatedFileSystemSize = list[7].let { if (it is Int) it.toLong() else it as Long }
+ val currentTopOfFileSystem = list[8].let { if (it is Int) it.toLong() else it as Long }
+ val snmpBufferSize = list[9].let { if (it is Int) it.toLong() else it as Long }
+ val remainingEPROMSize = list[10].let { if (it is Int) it.toLong() else it as Long }
+ val remainingTransientObjectSpace = list[11].let { if (it is Int) it.toLong() else it as Long }
+ val hashAlg = list[12].let { if (it is Int) it.toLong() else it as Long? }
+ val encAlg = list[13].let { if (it is Int) it.toLong() else it as Long? }
+ val lastServerSyncDate: DataTypeDate? = (list[14] as List<Any?>?)?.let {
+ DataTypeDate.fromList(it)
+ }
+ return MobileKeysEndpointInfo(endpointId, environmentType, seosAppletVersion, fileSystemAppletVersion, toolsAppletVersion, javaCardVersion, optionFlags, allocatedFileSystemSize, currentTopOfFileSystem, snmpBufferSize, remainingEPROMSize, remainingTransientObjectSpace, hashAlg, encAlg, lastServerSyncDate)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ endpointId,
+ environmentType.raw,
+ seosAppletVersion,
+ fileSystemAppletVersion,
+ toolsAppletVersion,
+ javaCardVersion,
+ optionFlags,
+ allocatedFileSystemSize,
+ currentTopOfFileSystem,
+ snmpBufferSize,
+ remainingEPROMSize,
+ remainingTransientObjectSpace,
+ hashAlg,
+ encAlg,
+ lastServerSyncDate?.toList(),
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysLastAuthenticationInfo (
+ val lastAuthenticatedMobileKey: MobileKeysKey,
+ val isModified: Boolean,
+ val authenticationCounter: Long
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysLastAuthenticationInfo {
+ val lastAuthenticatedMobileKey = MobileKeysKey.fromList(list[0] as List<Any?>)
+ val isModified = list[1] as Boolean
+ val authenticationCounter = list[2].let { if (it is Int) it.toLong() else it as Long }
+ return MobileKeysLastAuthenticationInfo(lastAuthenticatedMobileKey, isModified, authenticationCounter)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ lastAuthenticatedMobileKey.toList(),
+ isModified,
+ authenticationCounter,
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysTimeoutConfiguration (
+ val maxTimeBetweenFragments: Double,
+ val maxTimeBetweenApdus: Double,
+ val maxConnectionTime: Double
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysTimeoutConfiguration {
+ val maxTimeBetweenFragments = list[0] as Double
+ val maxTimeBetweenApdus = list[1] as Double
+ val maxConnectionTime = list[2] as Double
+ return MobileKeysTimeoutConfiguration(maxTimeBetweenFragments, maxTimeBetweenApdus, maxConnectionTime)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ maxTimeBetweenFragments,
+ maxTimeBetweenApdus,
+ maxConnectionTime,
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysRssiMeasurement (
+ val rssiValue: Long,
+ val measuredAtIntervalSince1970: Double
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysRssiMeasurement {
+ val rssiValue = list[0].let { if (it is Int) it.toLong() else it as Long }
+ val measuredAtIntervalSince1970 = list[1] as Double
+ return MobileKeysRssiMeasurement(rssiValue, measuredAtIntervalSince1970)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ rssiValue,
+ measuredAtIntervalSince1970,
+ )
+ }
+}
+
+/** Generated class from Pigeon that represents data sent in messages. */
+data class MobileKeysReader (
+ val rssiValueLimitsForOpeningTypeKeys: Map<Long?, Long?>,
+ val uuid: String? = null,
+ val readerCanConnect: Boolean,
+ val latestRssiMeasurement: MobileKeysRssiMeasurement? = null,
+ val lastSuccessfulConnection: DataTypeDate? = null,
+ val name: String? = null,
+ val localName: String? = null,
+ val supportedOpeningTypes: List<Long?>,
+ val lastRSSIUpdate: DataTypeDate? = null,
+ val readerType: MobileKeysReaderType,
+ val optionalScanResponseData: ByteArray? = null,
+ val serialNumberData: ByteArray? = null,
+ val appSpecificData: ByteArray? = null,
+ val protocolVersion: BleProtocol,
+ val txPowerLevel: Long
+
+) {
+ companion object {
+ @Suppress("UNCHECKED_CAST")
+ fun fromList(list: List<Any?>): MobileKeysReader {
+ val rssiValueLimitsForOpeningTypeKeys = list[0] as Map<Long?, Long?>
+ val uuid = list[1] as String?
+ val readerCanConnect = list[2] as Boolean
+ val latestRssiMeasurement: MobileKeysRssiMeasurement? = (list[3] as List<Any?>?)?.let {
+ MobileKeysRssiMeasurement.fromList(it)
+ }
+ val lastSuccessfulConnection: DataTypeDate? = (list[4] as List<Any?>?)?.let {
+ DataTypeDate.fromList(it)
+ }
+ val name = list[5] as String?
+ val localName = list[6] as String?
+ val supportedOpeningTypes = list[7] as List<Long?>
+ val lastRSSIUpdate: DataTypeDate? = (list[8] as List<Any?>?)?.let {
+ DataTypeDate.fromList(it)
+ }
+ val readerType = MobileKeysReaderType.ofRaw(list[9] as Int)!!
+ val optionalScanResponseData = list[10] as ByteArray?
+ val serialNumberData = list[11] as ByteArray?
+ val appSpecificData = list[12] as ByteArray?
+ val protocolVersion = BleProtocol.ofRaw(list[13] as Int)!!
+ val txPowerLevel = list[14].let { if (it is Int) it.toLong() else it as Long }
+ return MobileKeysReader(rssiValueLimitsForOpeningTypeKeys, uuid, readerCanConnect, latestRssiMeasurement, lastSuccessfulConnection, name, localName, supportedOpeningTypes, lastRSSIUpdate, readerType, optionalScanResponseData, serialNumberData, appSpecificData, protocolVersion, txPowerLevel)
+ }
+ }
+ fun toList(): List<Any?> {
+ return listOf<Any?>(
+ rssiValueLimitsForOpeningTypeKeys,
+ uuid,
+ readerCanConnect,
+ latestRssiMeasurement?.toList(),
+ lastSuccessfulConnection?.toList(),
+ name,
+ localName,
+ supportedOpeningTypes,
+ lastRSSIUpdate?.toList(),
+ readerType.raw,
+ optionalScanResponseData,
+ serialNumberData,
+ appSpecificData,
+ protocolVersion.raw,
+ txPowerLevel,
+ )
+ }
+}
+
+@Suppress("UNCHECKED_CAST")
+private object AppUsageAPICodec : StandardMessageCodec() {
+ override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
+ return when (type) {
+ 128.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ DataTypeDate.fromList(it)
+ }
+ }
+ 129.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysEndpointInfo.fromList(it)
+ }
+ }
+ 130.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysKey.fromList(it)
+ }
+ }
+ 131.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysLastAuthenticationInfo.fromList(it)
+ }
+ }
+ 132.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysOpeningType.fromList(it)
+ }
+ }
+ 133.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysReader.fromList(it)
+ }
+ }
+ 134.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysRssiMeasurement.fromList(it)
+ }
+ }
+ 135.toByte() -> {
+ return (readValue(buffer) as? List<Any?>)?.let {
+ MobileKeysTimeoutConfiguration.fromList(it)
+ }
+ }
+ else -> super.readValueOfType(type, buffer)
+ }
+ }
+ override fun writeValue(stream: ByteArrayOutputStream, value: Any?) {
+ when (value) {
+ is DataTypeDate -> {
+ stream.write(128)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysEndpointInfo -> {
+ stream.write(129)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysKey -> {
+ stream.write(130)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysLastAuthenticationInfo -> {
+ stream.write(131)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysOpeningType -> {
+ stream.write(132)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysReader -> {
+ stream.write(133)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysRssiMeasurement -> {
+ stream.write(134)
+ writeValue(stream, value.toList())
+ }
+ is MobileKeysTimeoutConfiguration -> {
+ stream.write(135)
+ writeValue(stream, value.toList())
+ }
+ else -> super.writeValue(stream, value)
+ }
+ }
+}
+
+/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
+interface AppUsageAPI {
+ fun startUp(options: Map<String?, Any?>, callback: (Result<Unit>) -> Unit)
+ fun deviceHasBluetoothTurnedOn(callback: (Result<Boolean>) -> Unit)
+ fun deviceSupportsBluetoothLowEnergy(callback: (Result<Boolean>) -> Unit)
+ fun isEndpointSetup(callback: (Result<Boolean>) -> Unit)
+ fun setupEndpoint(invitationCode: String, callback: (Result<Unit>) -> Unit)
+ fun updateEndpoint(callback: (Result<Unit>) -> Unit)
+ fun terminateEndpoint(callback: (Result<Unit>) -> Unit)
+ fun listMobileKeys(callback: (Result<List<MobileKeysKey>>) -> Unit)
+ fun activateMobileKey(key: MobileKeysKey, callback: (Result<Boolean>) -> Unit)
+ fun deactivateMobileKey(key: MobileKeysKey, callback: (Result<Boolean>) -> Unit)
+ fun generateOTPForKey(key: MobileKeysKey, callback: (Result<String>) -> Unit)
+ fun otpCounterForKey(key: MobileKeysKey, callback: (Result<Long>) -> Unit)
+ fun endpointInfo(callback: (Result<MobileKeysEndpointInfo>) -> Unit)
+ fun healthCheck(callback: (Result<List<MobileKeysInfoType>>) -> Unit)
+ fun apiVersion(callback: (Result<String>) -> Unit)
+ fun isScanning(callback: (Result<Boolean>) -> Unit)
+ fun startReaderScan(mode: MobileKeysScanMode, supportedOpeningTypes: List<MobileKeysOpeningType>, lockServiceCodes: List<Long>, callback: (Result<Unit>) -> Unit)
+ fun setSupportedOpeningTypes(supportedOpeningTypes: List<MobileKeysOpeningType>, callback: (Result<Unit>) -> Unit)
+ fun setTimeoutConfiguration(timeoutConfiguration: MobileKeysTimeoutConfiguration, callback: (Result<Unit>) -> Unit)
+ fun stopReaderScan(callback: (Result<Unit>) -> Unit)
+ fun lastAuthenticationInfo(callback: (Result<MobileKeysLastAuthenticationInfo>) -> Unit)
+ fun listReaders(callback: (Result<List<MobileKeysReader>>) -> Unit)
+ fun closestReaderWithinRangeOfOpeningType(type: MobileKeysOpeningType, callback: (Result<MobileKeysReader?>) -> Unit)
+ fun connectToReader(reader: MobileKeysReader, openingType: MobileKeysOpeningType, callback: (Result<Unit>) -> Unit)
+ fun forceConnectToReader(reader: MobileKeysReader, openingType: MobileKeysOpeningType, callback: (Result<Unit>) -> Unit)
+ fun cancelReaderConnection(reader: MobileKeysReader, callback: (Result<Unit>) -> Unit)
+ fun openClosestReader(callback: (Result<Unit>) -> Unit)
+ fun setRootOpeningTrigger(callback: (Result<Unit>) -> Unit)
+ fun removeRootOpeningTrigger(callback: (Result<Unit>) -> Unit)
+ fun isAnalyticsEnabled(callback: (Result<Boolean>) -> Unit)
+ fun analytics(enable: Boolean, callback: (Result<Unit>) -> Unit)
+
+ companion object {
+ /** The codec used by AppUsageAPI. */
+ val codec: MessageCodec<Any?> by lazy {
+ AppUsageAPICodec
+ }
+ /** Sets up an instance of `AppUsageAPI` to handle messages through the `binaryMessenger`. */
+ @Suppress("UNCHECKED_CAST")
+ fun setUp(binaryMessenger: BinaryMessenger, api: AppUsageAPI?) {
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.startUp", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val optionsArg = args[0] as Map<String?, Any?>
+ api.startUp(optionsArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.deviceHasBluetoothTurnedOn", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.deviceHasBluetoothTurnedOn() { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.deviceSupportsBluetoothLowEnergy", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.deviceSupportsBluetoothLowEnergy() { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.isEndpointSetup", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.isEndpointSetup() { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.setupEndpoint", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val invitationCodeArg = args[0] as String
+ api.setupEndpoint(invitationCodeArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.updateEndpoint", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.updateEndpoint() { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.terminateEndpoint", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.terminateEndpoint() { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.listMobileKeys", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.listMobileKeys() { result: Result<List<MobileKeysKey>> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.activateMobileKey", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val keyArg = args[0] as MobileKeysKey
+ api.activateMobileKey(keyArg) { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.deactivateMobileKey", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val keyArg = args[0] as MobileKeysKey
+ api.deactivateMobileKey(keyArg) { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.generateOTPForKey", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val keyArg = args[0] as MobileKeysKey
+ api.generateOTPForKey(keyArg) { result: Result<String> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.otpCounterForKey", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val keyArg = args[0] as MobileKeysKey
+ api.otpCounterForKey(keyArg) { result: Result<Long> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.endpointInfo", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.endpointInfo() { result: Result<MobileKeysEndpointInfo> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.healthCheck", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.healthCheck() { result: Result<List<MobileKeysInfoType>> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.apiVersion", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.apiVersion() { result: Result<String> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.isScanning", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.isScanning() { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.startReaderScan", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val modeArg = MobileKeysScanMode.ofRaw(args[0] as Int)!!
+ val supportedOpeningTypesArg = args[1] as List<MobileKeysOpeningType>
+ val lockServiceCodesArg = args[2] as List<Long>
+ api.startReaderScan(modeArg, supportedOpeningTypesArg, lockServiceCodesArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.setSupportedOpeningTypes", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val supportedOpeningTypesArg = args[0] as List<MobileKeysOpeningType>
+ api.setSupportedOpeningTypes(supportedOpeningTypesArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.setTimeoutConfiguration", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val timeoutConfigurationArg = args[0] as MobileKeysTimeoutConfiguration
+ api.setTimeoutConfiguration(timeoutConfigurationArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.stopReaderScan", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.stopReaderScan() { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.lastAuthenticationInfo", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.lastAuthenticationInfo() { result: Result<MobileKeysLastAuthenticationInfo> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.listReaders", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.listReaders() { result: Result<List<MobileKeysReader>> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.closestReaderWithinRangeOfOpeningType", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val typeArg = args[0] as MobileKeysOpeningType
+ api.closestReaderWithinRangeOfOpeningType(typeArg) { result: Result<MobileKeysReader?> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.connectToReader", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val readerArg = args[0] as MobileKeysReader
+ val openingTypeArg = args[1] as MobileKeysOpeningType
+ api.connectToReader(readerArg, openingTypeArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.forceConnectToReader", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val readerArg = args[0] as MobileKeysReader
+ val openingTypeArg = args[1] as MobileKeysOpeningType
+ api.forceConnectToReader(readerArg, openingTypeArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.cancelReaderConnection", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val readerArg = args[0] as MobileKeysReader
+ api.cancelReaderConnection(readerArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.openClosestReader", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.openClosestReader() { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.setRootOpeningTrigger", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.setRootOpeningTrigger() { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.removeRootOpeningTrigger", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.removeRootOpeningTrigger() { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.isAnalyticsEnabled", codec)
+ if (api != null) {
+ channel.setMessageHandler { _, reply ->
+ api.isAnalyticsEnabled() { result: Result<Boolean> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ val data = result.getOrNull()
+ reply.reply(wrapResult(data))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ run {
+ val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.seos_mobile_keys_plugin.AppUsageAPI.analytics", codec)
+ if (api != null) {
+ channel.setMessageHandler { message, reply ->
+ val args = message as List<Any?>
+ val enableArg = args[0] as Boolean
+ api.analytics(enableArg) { result: Result<Unit> ->
+ val error = result.exceptionOrNull()
+ if (error != null) {
+ reply.reply(wrapError(error))
+ } else {
+ reply.reply(wrapResult(null))
+ }
+ }
+ }
+ } else {
+ channel.setMessageHandler(null)
+ }
+ }
+ }
+ }
+}
diff --git a/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/ClosestLockTrigger.kt b/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/ClosestLockTrigger.kt
index 30909e08..d2ce7503 100644
--- a/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/ClosestLockTrigger.kt
+++ b/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/ClosestLockTrigger.kt
@@ -2,10 +2,44 @@ package com.assaabloy.flutter.seosmobilekeyssdk.seos_mobile_keys_plugin
import com.assaabloy.mobilekeys.api.ble.ManualOpeningTrigger
import com.assaabloy.mobilekeys.api.ble.OpeningStatus
+import com.assaabloy.mobilekeys.api.ble.OpeningTriggerAction
import com.assaabloy.mobilekeys.api.ble.OpeningType
import com.assaabloy.mobilekeys.api.ble.Reader
-class ClosestLockTrigger : ManualOpeningTrigger(){
+class ClosestLockTrigger() : ManualOpeningTrigger() {
+
+ private val listener: LockInRangeListener? = null
+
+ interface LockInRangeListener {
+ /**
+ * On lock in range callback
+ *
+ * @param lockInRange
+ */
+ fun onLockInRange(lockInRange: Boolean)
+ }
+
+ override fun onScanReceived(reader: Reader): OpeningTriggerAction? {
+ if (reader.isInMotionRange) {
+ updateLockInRangeStatus(true)
+ }
+ return OpeningTriggerAction.noOpening()
+ }
+
+ override fun onNoReadersInRange() {
+ super.onNoReadersInRange()
+ updateLockInRangeStatus(false)
+ }
+
+ override fun onStart() {
+ super.onStart()
+ updateLockInRangeStatus(bleScanner.listReaders().isEmpty())
+ }
+
+ override fun onStop() {
+ super.onStop()
+ updateLockInRangeStatus(false)
+ }
/**
* Open closest reader
@@ -31,4 +65,13 @@ class ClosestLockTrigger : ManualOpeningTrigger(){
}
return true
}
+
+ /**
+ * Update lock in range status
+ *
+ * @param lockInRange
+ */
+ private fun updateLockInRangeStatus(lockInRange: Boolean) {
+ listener?.onLockInRange(lockInRange)
+ }
}
\ No newline at end of file
diff --git a/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/SeosMobileKeysPlugin.kt b/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/SeosMobileKeysPlugin.kt
index 6f1a8f8e..eebc9a6f 100644
--- a/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/SeosMobileKeysPlugin.kt
+++ b/mobilekeys_sdk_plugin/android/src/main/kotlin/com/assaabloy/flutter/seosmobilekeyssdk/seos_mobile_keys_plugin/SeosMobileKeysPlugin.kt
@@ -402,7 +402,7 @@ class SeosMobileKeysPlugin: FlutterPlugin, AppUsageAPI {
it
)
})
- val containsEnhancedTap = supportedOpeningTypes.firstOrNull { it.openingType == OpeningType.ENHANCEDTAP } != null
+ val containsEnhancedTap = supportedOpeningTypes.firstOrNull { it.openingType == OpeningType.ENHANCED_TAP } != null
if (containsEnhancedTap) {
scanConfiguration.setBluetoothModeIfSupported(BluetoothMode.DUAL)
} else {
@@ -427,8 +427,8 @@ class SeosMobileKeysPlugin: FlutterPlugin, AppUsageAPI {
private fun MobileKeysScanMode.scanMode(): ScanMode {
return when (this) {
- MobileKeysScanMode.OPTIMIZEPERFORMANCE -> ScanMode.OPTIMIZE_PERFORMANCE
- MobileKeysScanMode.OPTIMIZEPOWERCONSUMPTION -> ScanMode.OPTIMIZE_POWER_CONSUMPTION
+ MobileKeysScanMode.OPTIMIZE_PERFORMANCE -> ScanMode.OPTIMIZE_PERFORMANCE
+ MobileKeysScanMode.OPTIMIZE_POWER_CONSUMPTION -> ScanMode.OPTIMIZE_POWER_CONSUMPTION
}
}
@@ -444,8 +444,8 @@ class SeosMobileKeysPlugin: FlutterPlugin, AppUsageAPI {
OpeningType.PROXIMITY -> openingTriggers.add(TapOpeningTrigger(context))
OpeningType.MOTION -> openingTriggers.add(TwistAndGoOpeningTrigger(context))
OpeningType.SEAMLESS -> openingTriggers.add(SeamlessOpeningTrigger())
- OpeningType.APPLICATIONSPECIFIC -> Unit
- OpeningType.ENHANCEDTAP -> Unit
+ OpeningType.APPLICATION_SPECIFIC -> Unit
+ OpeningType.ENHANCED_TAP -> Unit
}
}
return openingTriggers