diff --git a/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt b/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt index 0400aa0e..15fea2f2 100644 --- a/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt +++ b/android/app/src/main/kotlin/com/cloud/hmg_patient_app/penguin/PenguinView.kt @@ -214,7 +214,8 @@ internal class PenguinView( .setIsEnableReportIssue(false) .setEnableSharedLocationCallBack(false) .setShowUILoader(true) - .setCampusId(creationParams["projectID"] as Int) +// .setCampusId(creationParams["projectID"] as Int) + .setCampusId(1) .build() // Set location delegate to handle location updates diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 6d9e5c53..928c52f9 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -20,4 +20,5 @@ Geofence requests happened too frequently. pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ + diff --git a/ios/Runner/Penguin/PenguinModel.swift b/ios/Runner/Penguin/PenguinModel.swift index e41979d6..9d2f2082 100644 --- a/ios/Runner/Penguin/PenguinModel.swift +++ b/ios/Runner/Penguin/PenguinModel.swift @@ -47,8 +47,9 @@ struct PenguinModel { let isEnableReportIssue = dictionary["isEnableReportIssue"] as? Bool, let languageCode = dictionary["languageCode"] as? String, let clinicID = dictionary["clinicID"] as? String, - let patientID = dictionary["patientID"] as? String, - let projectID = dictionary["projectID"] as? String + let patientID = dictionary["patientID"] as? String +// let projectID = "1" +// let projectID = dictionary["projectID"] as? String else { print("Initialization failed due to missing or invalid keys.") return nil @@ -71,6 +72,6 @@ struct PenguinModel { self.languageCode = languageCode self.clinicID = clinicID self.patientID = patientID - self.projectID = projectID + self.projectID = "1" } } diff --git a/ios/Runner/Penguin/PenguinNavigator.swift b/ios/Runner/Penguin/PenguinNavigator.swift index e7ce55b4..ae412221 100644 --- a/ios/Runner/Penguin/PenguinNavigator.swift +++ b/ios/Runner/Penguin/PenguinNavigator.swift @@ -14,7 +14,7 @@ class PenguinNavigator { } func navigateToPOI( referenceId:String,completion: @escaping (Bool, String?) -> Void) { - PenNavUIManager.shared.getToken(clientID: config.clientID, clientKey: config.clientKey) { [weak self] token, error in + PenNavUIManager.shared.getToken(clientID: config.clientID, clientKey: config.clientKey, showProgress: false) { [weak self] token, error in if let error = error { let errorMessage = "Token error while getting the for Navigate to method" diff --git a/ios/Runner/Penguin/PenguinView.swift b/ios/Runner/Penguin/PenguinView.swift index b5161eb0..512d4b5b 100644 --- a/ios/Runner/Penguin/PenguinView.swift +++ b/ios/Runner/Penguin/PenguinView.swift @@ -16,6 +16,7 @@ import Foundation import UIKit import Flutter import PenNavUI +import PenguinINRenderer import Foundation import Flutter @@ -34,6 +35,7 @@ import UIKit class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitializationDelegate { + // The main view displayed within the platform view private var _view: UIView @@ -155,7 +157,9 @@ class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitia // Set the initialization delegate to handle SDK initialization events PenNavUIManager.shared.initializationDelegate = self - + + PIRendererSettings.styleUri = "mapbox://styles/rwaid/cm3h30b36007v01qz7ik8a0sk" + // Configure the Penguin SDK with necessary parameters PenNavUIManager.shared @@ -180,7 +184,9 @@ class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitia .setLanguage(args.languageCode) - .setBackButtonVisibility(true) + .setBackButtonVisibility(visible: true) + + .setCampusID(1) .build() @@ -269,8 +275,10 @@ class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitia * Called when the Penguin UI setup is successful. */ + - func onPenNavSuccess() { +// func onPenNavSuccess() { + func onPenNavInitializationSuccess() { print("====== onPenNavSuccess =========") @@ -340,7 +348,7 @@ class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitia - PenNavUIManager.shared.getToken(clientID: config.clientID, clientKey: config.clientKey) { [weak self] token, error in + PenNavUIManager.shared.getToken(clientID: config.clientID, clientKey: config.clientKey, showProgress: false) { [weak self] token, error in if let error = error { diff --git a/lib/config/config.dart b/lib/config/config.dart index 81ab834f..19f19aed 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -29,6 +29,7 @@ var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://webservices.hmg.com/'; +// var BASE_URL = 'https://webservices.hmg.com/ClientService/'; // RSG environment // var BASE_URL = 'http://10.50.100.198:4422/'; @@ -358,7 +359,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 20.4; +var VERSION_ID = 20.5; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 9c0f86f5..309604b1 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -189,7 +189,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 1018977; //4609100 //2904826 + // body['PatientID'] = 4773928; //4609100 //2904826 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index 3524aaee..f4105a75 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -220,7 +220,7 @@ class ServicesView extends StatelessWidget { Permission.bluetoothScan, Permission.activityRecognition, ].request().whenComplete(() { - PenguinMethodChannel().launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString(), details: data); + PenguinMethodChannel().launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.isLogin ? projectViewModel.authenticatedUserObject.user.patientID.toString() : "3628599", details: data); }); } } diff --git a/lib/uitl/penguin_method_channel.dart b/lib/uitl/penguin_method_channel.dart index 3c3402b2..e185d89a 100644 --- a/lib/uitl/penguin_method_channel.dart +++ b/lib/uitl/penguin_method_channel.dart @@ -12,9 +12,13 @@ class PenguinMethodChannel { try { await _channel.invokeMethod('launchPenguin', { "storyboardName": storyboardName, - "baseURL": "https://prod.hmg.nav.penguinin.com", - "dataURL": "https://prod.hmg.nav.penguinin.com", - "positionURL": "https://prod.hmg.nav.penguinin.com", + // "baseURL": "https://prod.hmg.nav.penguinin.com", + // "dataURL": "https://prod.hmg.nav.penguinin.com", + // "positionURL": "https://prod.hmg.nav.penguinin.com", + + "baseURL": "https://eagleiq.hmg.com", + "dataURL": "https://eagleiq.hmg.com", + "positionURL": "https://eagleiq.hmg.com", // "baseURL": "https://penguinuat.hmg.com", // "dataURL": "https://penguinuat.hmg.com", @@ -36,6 +40,7 @@ class PenguinMethodChannel { // "clinicID": "108", // 46 ,49, 133 "patientID": details?.patientId ?? "", "projectID": int.parse(details?.projectId ?? "-1"), + // "projectID": details?.projectId ?? "-1", "loaderImage": image, }); } on PlatformException catch (e) { diff --git a/pubspec.yaml b/pubspec.yaml index 695de2b4..2d81c2da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: hmg_patient_app description: A new Flutter application. -#version: 4.6.030+1 -version: 4.6.0984+40500984 +#version: 4.6.033+1 +version: 4.6.0988+40500988 environment: # sdk: ">=3.0.0 <3.13.0"