From 2500441832066d81f7281013688b19c871baa768 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 12 Oct 2023 16:22:42 +0300 Subject: [PATCH] ViBeat device integrated --- ios/Runner.xcodeproj/project.pbxproj | 18 ++++-------------- ios/Runner/Runner-Bridging-Header.h | 1 + lib/config/config.dart | 4 ++-- lib/pages/ble_screen.dart | 2 +- .../viatom_devices/oxymeter_ble.dart | 5 ++++- lib/viatom_ble/ble_connect.dart | 4 ++-- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 7349fb53..6fcb7dfc 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; }; 762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; }; + 76801ACA2AD7F7DA00126C2D /* CRAP20Lib.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76801AC92AD7F7D900126C2D /* CRAP20Lib.xcframework */; }; 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; }; 76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; }; 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76F2556027F1FFED0062C1CD /* PassKit.framework */; }; @@ -45,19 +46,6 @@ E9F7623B25922BCE00FB5CCF /* FlutterConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */; }; /* End PBXBuildFile section */ -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; @@ -72,6 +60,7 @@ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = ""; }; 762D738D274E42650063CE73 /* ring_30Sec.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = ring_30Sec.mp3; path = ../../assets/sounds/ring_30Sec.mp3; sourceTree = ""; }; + 76801AC92AD7F7D900126C2D /* CRAP20Lib.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CRAP20Lib.xcframework; path = Runner/BLE_SDKs/CRAP20Lib.xcframework; sourceTree = ""; }; 76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; }; 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; }; @@ -115,6 +104,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 76801ACA2AD7F7DA00126C2D /* CRAP20Lib.xcframework in Frameworks */, 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */, 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */, E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */, @@ -138,6 +128,7 @@ 555EAAA626EFB641859EF0BE /* Frameworks */ = { isa = PBXGroup; children = ( + 76801AC92AD7F7D900126C2D /* CRAP20Lib.xcframework */, 76F2556027F1FFED0062C1CD /* PassKit.framework */, 76815B26275F381C00E66E94 /* HealthKit.framework */, E9620804255C2ED100D3A35D /* NetworkExtension.framework */, @@ -280,7 +271,6 @@ 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */, 4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */, diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h index bd07f4f6..ebd7fcdd 100644 --- a/ios/Runner/Runner-Bridging-Header.h +++ b/ios/Runner/Runner-Bridging-Header.h @@ -1,3 +1,4 @@ #import "GeneratedPluginRegistrant.h" #import "VTBLEUtils.h" #import "VTDevice.h" +#import diff --git a/lib/config/config.dart b/lib/config/config.dart index 0b601e01..1b4c69b3 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; +var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; diff --git a/lib/pages/ble_screen.dart b/lib/pages/ble_screen.dart index f21a6d3d..f621b78f 100644 --- a/lib/pages/ble_screen.dart +++ b/lib/pages/ble_screen.dart @@ -39,7 +39,7 @@ class _BLEScreenState extends State { Center( child: GestureDetector( onTap: () async { - await BleChannel.getScanningResult("oximeter"); + // await BleChannel.getScanningResult("oximeter"); }, child: Container( width: 50, diff --git a/lib/pages/medical/my_trackers/viatom_devices/oxymeter_ble.dart b/lib/pages/medical/my_trackers/viatom_devices/oxymeter_ble.dart index 33bb7cc7..9277018c 100644 --- a/lib/pages/medical/my_trackers/viatom_devices/oxymeter_ble.dart +++ b/lib/pages/medical/my_trackers/viatom_devices/oxymeter_ble.dart @@ -17,6 +17,9 @@ class _Oxymeter_BLEState extends State { final oxymeterValueNotifier = ValueNotifier("start"); + // String deviceName = "CheckMeO2"; + String deviceName = "POD"; + @override void dispose() { oxymeterValueNotifier.dispose(); @@ -107,7 +110,7 @@ class _Oxymeter_BLEState extends State { // POD-1W response: RtParam{spo2=98, pr=104, pi=5.8, isProbeOff=false, isPulseSearching=false} }); - await BleChannel.getScanningResult("oximeter"); + await BleChannel.getScanningResult(["oximeter", deviceName]); }); } diff --git a/lib/viatom_ble/ble_connect.dart b/lib/viatom_ble/ble_connect.dart index 569383a4..d25b59c5 100644 --- a/lib/viatom_ble/ble_connect.dart +++ b/lib/viatom_ble/ble_connect.dart @@ -5,10 +5,10 @@ class BleChannel { //BLE-Platform-Bridge - static Future getScanningResult(String deviceType) async { + static Future getScanningResult(List deviceType) async { try { print("----------Flutter Init -------"); - final String result = await platform.invokeMethod('scan'); + final String result = await platform.invokeMethod('scan', deviceType); print("----------Flutter Result -------"); print(result); return result;