diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index d9d2f0b..1d0e845 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -18,22 +18,33 @@ if (keystorePropertiesFile.exists()) { } android { -// namespace = "com.ejada.hmg" namespace = "com.cloudsolutions.HMGPatientApp" compileSdk = 36 - ndkVersion = "28.2.13676358" + // Using NDK 26 for better compatibility with Zoom SDK native libraries + ndkVersion = "27.0.12077973" +// ndkVersion = "25.1.8937393" + + sourceSets { + getByName("main") { + jniLibs.srcDirs("src/main/jniLibs") + } + } defaultConfig { -// applicationId = "com.ejada.hmg" applicationId = "com.cloudsolutions.HMGPatientApp" // minSdk = 24 minSdk = 26 - targetSdk = 36 + targetSdk = 35 compileSdk = 36 // targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName multiDexEnabled = true + + // Filter to arm64-v8a for better native library compatibility + ndk { + abiFilters += listOf("arm64-v8a", "armeabi-v7a") + } } buildFeatures { @@ -84,7 +95,7 @@ android { } } - packagingOptions { + packaging { jniLibs { pickFirsts += listOf( "lib/x86/libc++_shared.so", @@ -94,9 +105,16 @@ android { "**/*.so" ) useLegacyPackaging = true + // Keep Zoom SDK libraries unstripped to preserve symbols + keepDebugSymbols += listOf( + "*/libzoom_util.so", + "*/libzoom_check.so", + "*/libc++_shared.so" + ) } resources { excludes += listOf("META-INF/proguard/androidx-annotations.pro") + excludes.add("lib/*/libc++_shared.so") } } @@ -129,9 +147,13 @@ dependencies { implementation("com.google.code.gson:gson:2.12.0") // Zoom SDKs - implementation("us.zoom.videosdk:zoomvideosdk-core:1.12.10") - implementation("us.zoom.videosdk:zoomvideosdk-annotation:1.12.10") - implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:1.12.10") +// implementation("us.zoom.videosdk:zoomvideosdk-core:1.12.10") +// implementation("us.zoom.videosdk:zoomvideosdk-annotation:1.12.10") +// implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:1.12.10") + + implementation("us.zoom.videosdk:zoomvideosdk-core:2.1.10") + implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:2.1.10") + implementation("us.zoom.videosdk:zoomvideosdk-annotation:2.1.10") // Networking implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11") @@ -189,5 +211,39 @@ dependencies { implementation("com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5") // implementation(project(":vitalSignEngine")) +} -} \ No newline at end of file +tasks.whenTaskAdded { + if (name.contains("merge") && name.contains("NativeLibs")) { + doLast { + val outputDir = File(project.buildDir, "intermediates/merged_native_libs/release/out/lib") + + // Handle both architectures + val abis = listOf("arm64-v8a", "armeabi-v7a") + abis.forEach { abi -> + val targetFile = File(outputDir, "$abi/libc++_shared.so") + val sourceFile = file("src/main/jniLibs/$abi/libc++_shared.so") + + if (sourceFile.exists() && targetFile.exists()) { + println("FORCING: Overwriting $abi version with known-good 1.2MB library") + sourceFile.copyTo(targetFile, overwrite = true) + } + } + } + } +} + +//tasks.whenTaskAdded { +// if (name.contains("merge") && name.contains("NativeLibs")) { +// doLast { +// val outputDir = File(project.buildDir, "intermediates/merged_native_libs/release/out/lib") +// val targetFile = File(outputDir, "arm64-v8a/libc++_shared.so") +// val sourceFile = file("src/main/jniLibs/arm64-v8a/libc++_shared.so") +// +// if (sourceFile.exists()) { +// println("FORCE REPLACING: Injecting 1.2MB libc++ into APK...") +// sourceFile.copyTo(targetFile, overwrite = true) +// } +// } +// } +//} \ No newline at end of file diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 9c1827a..94ad242 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -52,6 +52,11 @@ *; } +# Prevent stripping of standard C++ symbols +-keepclassmembers class * { + native ; +} + -dontwarn com.opentok.android.** -dontwarn com.opentok.otc.** diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 54e1a5e..7267f0a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -133,6 +133,7 @@ android:screenOrientation="sensorPortrait" android:showOnLockScreen="true" android:usesCleartextTraffic="true" + android:extractNativeLibs="true" tools:replace="android:label"> diff --git a/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so b/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so new file mode 100755 index 0000000..a80c8b3 Binary files /dev/null and b/android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so differ diff --git a/android/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so b/android/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so new file mode 100755 index 0000000..cbff8a9 Binary files /dev/null and b/android/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so differ diff --git a/android/build/reports/problems/problems-report.html b/android/build/reports/problems/problems-report.html deleted file mode 100644 index 9b679bc..0000000 --- a/android/build/reports/problems/problems-report.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - - - - - - - - Gradle Configuration Cache - - - -
- -
- Loading... -
- - - - - - diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index e706a9d..f9c44e7 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -194,8 +194,8 @@ class ApiClientImp implements ApiClient { body['TokenID'] = "@dm!n"; } - body['TokenID'] = "@dm!n"; - body['PatientID'] = 4773781; + // body['TokenID'] = "@dm!n"; + // body['PatientID'] = 4773922; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; // body['SessionID'] = "45786230487560q"; diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 708324e..3913200 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -57,7 +57,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.uat: baseUrl = "https://uat.hmgwebservices.com/"; @@ -69,7 +69,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.preProd: baseUrl = "https://webservices.hmg.com/"; @@ -81,7 +81,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.qa: baseUrl = "https://uat.hmgwebservices.com/"; @@ -93,7 +93,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.staging: baseUrl = "https://uat.hmgwebservices.com/"; @@ -105,7 +105,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; } } @@ -229,7 +229,7 @@ class ApiConsts { static String getAiOverViewLabOrder = "Services/Patients.svc/REST/HMGAI_Lab_Analyzer_API"; // ************ static values for Api **************** - static final double appVersionID = 19.8; + static final double appVersionID = 20.1; // static final double appVersionID = 50.7; static final int appChannelId = 3; static final String appIpAddress = "10.20.10.20"; @@ -517,8 +517,6 @@ var IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointment var GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; var ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; -var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; - var GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; var GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index 671312d..8b5b284 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -860,7 +860,7 @@ class Utils { static String getAppointmentTransID(int projectID, int clinicID, int appoNo, {bool isAddMilliseconds = true}) { String currentMillis = DateTime.now().millisecondsSinceEpoch.toString(); - return '$projectID-$clinicID-$appoNo${isAddMilliseconds ? '-${currentMillis.substring(currentMillis.length - 5, currentMillis.length)}' : ""}'; + return '$projectID-$clinicID-$appoNo${isAddMilliseconds ? '-${currentMillis.substring(currentMillis.length - 5, currentMillis.length)}${currentMillis.substring(currentMillis.length - 5, currentMillis.length)}' : ""}'; } static String getAdvancePaymentTransID(int projectID, int fileNumber) { diff --git a/lib/features/ask_doctor/ask_doctor_view_model.dart b/lib/features/ask_doctor/ask_doctor_view_model.dart index 2b9600e..b28ead1 100644 --- a/lib/features/ask_doctor/ask_doctor_view_model.dart +++ b/lib/features/ask_doctor/ask_doctor_view_model.dart @@ -67,7 +67,7 @@ class AskDoctorViewModel extends ChangeNotifier { (failure) async { isDoctorResponsesLoading = false; notifyListeners(); - await errorHandlerService.handleError(failure: failure); + // await errorHandlerService.handleError(failure: failure); if (onError != null) { onError(failure.toString()); } diff --git a/lib/features/contact_us/contact_us_view_model.dart b/lib/features/contact_us/contact_us_view_model.dart index 72bcff7..d627c55 100644 --- a/lib/features/contact_us/contact_us_view_model.dart +++ b/lib/features/contact_us/contact_us_view_model.dart @@ -153,7 +153,7 @@ class ContactUsViewModel extends ChangeNotifier { // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); } else if (apiResponse.messageStatus == 1) { liveChatProjectsList = apiResponse.data!; - liveChatProjectsList.sort((a, b) => b.distanceInKilometers.compareTo(a.distanceInKilometers)); + liveChatProjectsList.sort((a, b) => a.distanceInKilometers.compareTo(b.distanceInKilometers)); isLiveChatProjectsListLoading = false; notifyListeners(); if (onSuccess != null) { diff --git a/lib/features/my_appointments/my_appointments_view_model.dart b/lib/features/my_appointments/my_appointments_view_model.dart index f887680..d2296a6 100644 --- a/lib/features/my_appointments/my_appointments_view_model.dart +++ b/lib/features/my_appointments/my_appointments_view_model.dart @@ -791,7 +791,11 @@ class MyAppointmentsViewModel extends ChangeNotifier { final result = await myAppointmentsRepo.getTamaraInstallmentsDetails(); result.fold( - (failure) async => await errorHandlerService.handleError(failure: failure), + // (failure) async => await errorHandlerService.handleError(failure: failure), + (failure) async { + isTamaraDetailsLoading = false; + notifyListeners(); + }, (apiResponse) { getTamaraInstallmentsDetailsResponseModel = apiResponse.data!; isTamaraDetailsLoading = false; diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 9e56053..467ba64 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -70,7 +70,7 @@ class AppointmentDoctorCard extends StatelessWidget { children: [ Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), SizedBox(height: 2.h), - "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor), + "${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? 0.0}".toText11(isBold: true, color: AppColors.textColor), ], ), ).circle(100), diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart index bb347e5..abd8d10 100644 --- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart +++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart @@ -484,6 +484,7 @@ class _WaitingAppointmentPaymentPageState extends State { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: ListView( + padding: EdgeInsets.zero, physics: const BouncingScrollPhysics(), children: [ const SizedBox(height: 12), @@ -97,7 +98,10 @@ class _OtherDetailsStepState extends State { InkWell( child: TextInputWidget( controller: _medicalReportController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.medicalReport.tr(context: context), labelText: LocaleKeys.selectAttachment.tr(context: context), suffix: const Icon(Icons.attachment), @@ -169,6 +173,7 @@ class _OtherDetailsStepState extends State { if (!value) { _updateInsuranceText(); } + setState(() {}); }, ), Padding( @@ -194,7 +199,10 @@ class _OtherDetailsStepState extends State { InkWell( child: TextInputWidget( controller: _insuranceController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.insuranceDocument.tr(context: context), labelText: LocaleKeys.selectAttachment.tr(context: context), suffix: const Icon(Icons.attachment), @@ -234,7 +242,6 @@ class _OtherDetailsStepState extends State { } void _showBranchBottomSheet(BuildContext context, ReferralFormManager formManager) { - showCommonBottomSheetWithoutHeight( context, title: LocaleKeys.selectBranch.tr(context: context), @@ -266,8 +273,9 @@ class _OtherDetailsStepState extends State { onTap: () { formManager.updateBranch(branch); Navigator.pop(context); - }, - ); + setState(() {}); + }, + ); }, // separatorBuilder: (context, index) => const Divider(), itemCount: hospitals.length, diff --git a/lib/presentation/e_referral/widget/e_referral_patient_info.dart b/lib/presentation/e_referral/widget/e_referral_patient_info.dart index 61b92c7..cbce691 100644 --- a/lib/presentation/e_referral/widget/e_referral_patient_info.dart +++ b/lib/presentation/e_referral/widget/e_referral_patient_info.dart @@ -64,6 +64,7 @@ class PatientInformationStepState extends State { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: ListView( + padding: EdgeInsets.zero, physics: const BouncingScrollPhysics(), children: [ const SizedBox(height: 12), @@ -71,7 +72,6 @@ class PatientInformationStepState extends State { const SizedBox(height: 12), _buildIdentificationField(formManager), _buildPatientNameField(formManager), - // _buildPatientCountryField(context, formManager), _buildPatientPhoneField(formManager), const SizedBox(height: 20), _buildSectionTitle(LocaleKeys.patientLocation.tr(context: context)), @@ -95,7 +95,10 @@ class PatientInformationStepState extends State { focusNode: _identificationFocusNode, child: TextInputWidget( controller: _identificationController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.enterIdentificationNumber.tr(context: context), labelText: LocaleKeys.identificationNumber.tr(context: context), errorMessage: formManager.errors.patientIdentification, @@ -115,7 +118,10 @@ class PatientInformationStepState extends State { focusNode: _nameFocusNode, child: TextInputWidget( controller: _nameController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.patientName.tr(context: context), labelText: LocaleKeys.name.tr(context: context), keyboardType: TextInputType.text, diff --git a/lib/presentation/e_referral/widget/e_referral_requester_form.dart b/lib/presentation/e_referral/widget/e_referral_requester_form.dart index d2b75cc..b49846f 100644 --- a/lib/presentation/e_referral/widget/e_referral_requester_form.dart +++ b/lib/presentation/e_referral/widget/e_referral_requester_form.dart @@ -94,7 +94,6 @@ class RequesterFormStepState extends State { focusNode: _nameFocusNode, child: TextInputWidget( controller: _nameController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), hintText: LocaleKeys.enterReferralRequesterName.tr(context: context), labelText: LocaleKeys.requesterName.tr(context: context), keyboardType: TextInputType.text, @@ -102,6 +101,10 @@ class RequesterFormStepState extends State { isAllowLeadingIcon: true, leadingIcon: AppAssets.user_circle, hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.requesterName), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), onChange: (value) { formManager.updateRequesterName(value ?? ''); }, diff --git a/lib/presentation/habib_wallet/recharge_wallet_page.dart b/lib/presentation/habib_wallet/recharge_wallet_page.dart index 78608e8..c4587bf 100644 --- a/lib/presentation/habib_wallet/recharge_wallet_page.dart +++ b/lib/presentation/habib_wallet/recharge_wallet_page.dart @@ -185,13 +185,13 @@ class _RechargeWalletPageState extends State { ], ), ], - ).onPress(() { - showCommonBottomSheetWithoutHeight(context, - title: LocaleKeys.selectHospital.tr(context: context), isDismissible: false, child: SelectHospitalBottomSheet(), callBackFunc: () {}); - }), + ), Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, width: 25.h, height: 25.h), ], - ), + ).onPress(() { + showCommonBottomSheetWithoutHeight(context, + title: LocaleKeys.selectHospital.tr(context: context), isDismissible: false, child: SelectHospitalBottomSheet(), callBackFunc: () {}); + }), SizedBox(height: 16.h), Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), SizedBox(height: 16.h), diff --git a/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart b/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart index 5a34034..d6a616e 100644 --- a/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart +++ b/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart @@ -66,9 +66,7 @@ class PrescriptionDeliveryOrderSummaryPage extends StatelessWidget { Expanded( child: Padding( padding: EdgeInsets.all(8.h), - child: Center( - child: prescriptionsViewModel.prescriptionDetailsList[index].itemDescription!.trim().toText12(), - ), + child: prescriptionsViewModel.prescriptionDetailsList[index].itemDescription!.trim().toText14(weight: FontWeight.w500), ), ), ], diff --git a/pubspec.yaml b/pubspec.yaml index 01c155b..00d9d42 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: hmg_patient_app_new description: "New HMG Patient App" publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 0.0.1+3 +version: 0.0.1+4 environment: sdk: ">=3.6.0 <4.0.0" @@ -90,13 +90,10 @@ dependencies: location: ^8.0.1 gms_check: ^1.0.4 huawei_location: ^6.14.2+301 - huawei_health: ^6.16.0+300 +# huawei_health: ^6.16.0+300 intl: ^0.20.2 flutter_widget_from_html: ^0.17.1 - huawei_map: - git: - url: https://github.com/fleoparra/hms-flutter-plugin.git - path: flutter-hms-map + huawei_map: ^6.12.0+301 scrollable_positioned_list: ^0.3.8