diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt b/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt new file mode 100644 index 00000000..aed21dd3 --- /dev/null +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt @@ -0,0 +1,101 @@ +package com.hmg.hmgDr + +import android.app.Activity +import android.content.Intent +import androidx.annotation.NonNull +import com.example.doctor_app_flutter.Model.GetSessionStatusModel +import com.example.doctor_app_flutter.Model.SessionStatusModel +import com.example.doctor_app_flutter.ui.VideoCallActivity +import com.google.gson.GsonBuilder +import io.flutter.embedding.android.FlutterFragmentActivity +import io.flutter.embedding.engine.FlutterEngine +import io.flutter.plugin.common.MethodCall +import io.flutter.plugin.common.MethodChannel +import io.flutter.plugins.GeneratedPluginRegistrant + +class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler { + + private val CHANNEL = "Dr.cloudSolution/videoCall" + private var result: MethodChannel.Result? = null + private var call: MethodCall? = null + private val LAUNCH_VIDEO: Int = 1 + + + override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { + GeneratedPluginRegistrant.registerWith(flutterEngine) + + MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler(this) + } + + + override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) { + + this.result = result + this.call = call + + if (call.method == "openVideoCall") { + val apiKey = call.argument("kApiKey") + val sessionId = call.argument("kSessionId") + val token = call.argument("kToken") + val appLang = call.argument("appLang") + val baseUrl = call.argument("baseUrl") + + // Session Status model + val VC_ID = call.argument("VC_ID") + val tokenID = call.argument("TokenID") + val generalId = call.argument("generalId") + val doctorId = call.argument("DoctorId") + + val sessionStatusModel = GetSessionStatusModel(VC_ID, tokenID, generalId, doctorId) + + + openVideoCall(apiKey, sessionId, token, appLang, baseUrl, sessionStatusModel) + + } else { + result.notImplemented() + } + } + + private fun openVideoCall(apiKey: String?, sessionId: String?, token: String?, appLang: String?, baseUrl: String?, sessionStatusModel: GetSessionStatusModel) { + // val videoCallActivity = VideoCallActivity() + + val intent = Intent(this, VideoCallActivity::class.java) + intent.putExtra("apiKey", apiKey) + intent.putExtra("sessionId", sessionId) + intent.putExtra("token", token) + intent.putExtra("appLang", appLang) + intent.putExtra("baseUrl", baseUrl) + intent.putExtra("sessionStatusModel", sessionStatusModel) + startActivityForResult(intent, LAUNCH_VIDEO) + + } + + + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + var asd = ""; + if (requestCode == LAUNCH_VIDEO) { + if (resultCode == Activity.RESULT_OK) { + val result : SessionStatusModel? = data?.getParcelableExtra("sessionStatusNotRespond") + val callResponse : HashMap = HashMap() + + val sessionStatus : HashMap = HashMap() + val gson = GsonBuilder().serializeNulls().create() + + callResponse["callResponse"] = "CallNotRespond" + val jsonRes = gson.toJson(result) + callResponse["sessionStatus"] = jsonRes + + this.result?.success(callResponse) + } + if (resultCode == Activity.RESULT_CANCELED) { + val callResponse : HashMap = HashMap() + callResponse["callResponse"] = "CallEnd" + + result?.success(callResponse) + } + } + } + + +} diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 9d448f00..f0784432 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -375,7 +375,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -389,7 +389,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.3.0; + MARKETING_VERSION = 1.3.1; PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -510,7 +510,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -524,7 +524,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.3.0; + MARKETING_VERSION = 1.3.1; PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -541,7 +541,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -555,7 +555,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.3.0; + MARKETING_VERSION = 1.3.1; PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index acabe064..2314a2c8 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -26,10 +26,8 @@ LSRequiresIPhoneOS - NSSpeechRecognitionUsageDescription - This permission is not needed by the app, but it is required by an underlying API. If you see this dialog, contact us. NSAppleMusicUsageDescription - This permission is not needed by the app, but it is required by an underlying API. If you see this dialog, contact us. + ${PRODUCT_NAME} requires access to use voice command NSCalendarsUsageDescription This app requires calendar access to set reminders for Virtual & Normal Appointments. NSCameraUsageDescription @@ -38,11 +36,6 @@ This app requires contacts access to show incoming virtual consultation request. NSFaceIDUsageDescription We are using it for authentication - - NSAppleMusicUsageDescription - ${PRODUCT_NAME} requires access to use voice command - - NSLocationWhenInUseUsageDescription This App requires access to your location to show the nearest hospitals from your location. NSMicrophoneUsageDescription @@ -51,6 +44,8 @@ This app requires motion detection access to function properly. NSPhotoLibraryUsageDescription Need to upload image + NSSpeechRecognitionUsageDescription + This permission is not needed by the app, but it is required by an underlying API. If you see this dialog, contact us. UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index e92a921c..177b95ee 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -147,7 +147,7 @@ class BaseAppClient { : SETUP_ID; } - body['VersionID'] = 8.3; + body['VersionID'] = 5.8; body['Channel'] = CHANNEL; body['LanguageID'] = languageID == 'ar' ? 1 : 2; diff --git a/lib/config/config.dart b/lib/config/config.dart index 07151d1d..9596a029 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -336,7 +336,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 5.9; +const VERSION_ID = 5.8; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart index 76f9f18a..680adada 100644 --- a/lib/core/service/patient-doctor-referral-service.dart +++ b/lib/core/service/patient-doctor-referral-service.dart @@ -29,7 +29,7 @@ class PatientReferralService extends LookupService { "LanguageID": 1, "stamp": "2020-02-26T13:51:44.111Z", "IPAdress": "11.11.11.11", - "VersionID": 5.5, + "VersionID": 5.8, "Channel": 9, "TokenID": "", "SessionID": "i1UJwCTSqt", diff --git a/lib/core/viewModel/hospital_view_model.dart b/lib/core/viewModel/hospital_view_model.dart index dbb5e4fb..a49b85e5 100644 --- a/lib/core/viewModel/hospital_view_model.dart +++ b/lib/core/viewModel/hospital_view_model.dart @@ -13,7 +13,7 @@ class HospitalViewModel with ChangeNotifier { "LanguageID": 1, "stamp": "2020-02-26T13:51:44.111Z", "IPAdress": "11.11.11.11", - "VersionID": 5.5, + "VersionID": 5.8, "Channel": 9, "TokenID": "", "SessionID": "i1UJwCTSqt", diff --git a/lib/models/patient/get_list_stp_referral_frequency_request.dart b/lib/models/patient/get_list_stp_referral_frequency_request.dart index f524aa37..7f466deb 100644 --- a/lib/models/patient/get_list_stp_referral_frequency_request.dart +++ b/lib/models/patient/get_list_stp_referral_frequency_request.dart @@ -37,7 +37,7 @@ class STPReferralFrequencyRequest { {this.languageID = 2, this.stamp = "2020-06-03T11:18:19.986Z", this.iPAdress = "11.11.11.11", - this.versionID = 5.5, + this.versionID = 5.8, this.channel = 9, this.tokenID, this.sessionID = "JBXRsDl37L", diff --git a/lib/models/patient/insurance_aprovals_request.dart b/lib/models/patient/insurance_aprovals_request.dart index 63e7926a..2d3ac663 100644 --- a/lib/models/patient/insurance_aprovals_request.dart +++ b/lib/models/patient/insurance_aprovals_request.dart @@ -45,7 +45,7 @@ class InsuranceAprovalsRequest { this.languageID = 2, this.stamp = '2020-04-23T21:01:21.492Z', this.ipAdress = '11.11.11.11', - this.versionID = 5.5, + this.versionID = 5.8, this.tokenID , this.sessionID = 'e29zoooEJ4', this.isLoginForDoctorApp = true, diff --git a/lib/models/patient/vital_sign/vital_sign_req_model.dart b/lib/models/patient/vital_sign/vital_sign_req_model.dart index 61e3fcf2..2cfd24c2 100644 --- a/lib/models/patient/vital_sign/vital_sign_req_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_req_model.dart @@ -31,7 +31,7 @@ class VitalSignReqModel { this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress='11.11.11.11', - this.versionID=5.5, + this.versionID=5.8, this.channel=9, this.sessionID='E2bsEeYEJo', this.isLoginForDoctorApp=true, diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index 8d6b9b46..4f2e947a 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -24,7 +24,7 @@ class PharmaciesItemsRequestModel { {this.pHRItemName, this.pageIndex = 0, this.pageSize = 20, - this.versionID = 5.5, + this.versionID = 5.8, this.channel = 3, this.languageID = 2, this.iPAdress = "10.20.10.20", diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart index 4580e5c8..e4f933e7 100644 --- a/lib/screens/doctor/patient_arrival_screen.dart +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -31,7 +31,7 @@ class _PatientArrivalScreen extends State LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", IPAdress: "11.11.11.11", - VersionID: 5.5, + VersionID: 5.8, Channel: 9, TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", SessionID: "5G0yXn0Jnq", diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index db7a2e21..88b8547b 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -62,7 +62,7 @@ class _PatientSearchScreenState extends State { LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", IPAdress: "11.11.11.11", - VersionID: 5.5, + VersionID: 5.8, Channel: 9, TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", SessionID: "5G0yXn0Jnq", diff --git a/pubspec.yaml b/pubspec.yaml index 9472f598..58dd50be 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter project. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.1+1 +version: 1.2.2+2 environment: sdk: ">=2.8.0 <3.0.0"