diff --git a/app/build.gradle b/app/build.gradle index e6c1708..1d95671 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,11 +16,11 @@ android { // prod - production, preprod - preproduction, quality - qc, dev - development defaultConfig { - applicationId "in.sminnovations.hpostesting.dev" + applicationId "in.sminnovations.hpostesting.quality" minSdk 21 targetSdk 34 - versionCode 91 - versionName "2.1.91" + versionCode 92 + versionName "2.1.92" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/google-services.json b/app/google-services.json index ba13e8f..7f4a67b 100644 --- a/app/google-services.json +++ b/app/google-services.json @@ -1,179 +1,48 @@ { "project_info": { - "project_number": "650071678820", - "project_id": "hpos-af3cc", - "storage_bucket": "hpos-af3cc.appspot.com" + "project_number": "1004619739289", + "project_id": "hpos-qa", + "storage_bucket": "hpos-qa.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:650071678820:android:f1435a1c07f710036c6471", + "mobilesdk_app_id": "1:1004619739289:android:f669b47552748433e5c808", "android_client_info": { - "package_name": "com.example.hposconsentform" + "package_name": "in.sminnovations.hposregistration.quality" } }, - "oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ], + "oauth_client": [], "api_key": [ { - "current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I" + "current_key": "AIzaSyC4d4GhWHr_NMJAeBvnztQ_yQ3Qe9MAnLs" } ], "services": { "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ] + "other_platform_oauth_client": [] } } }, { "client_info": { - "mobilesdk_app_id": "1:650071678820:android:2925e9ce3417d2386c6471", + "mobilesdk_app_id": "1:1004619739289:android:8397cd1f0357bd89e5c808", "android_client_info": { - "package_name": "in.sminnovations.hemocube" + "package_name": "in.sminnovations.hpostesting.quality" } }, - "oauth_client": [ - { - "client_id": "650071678820-srhm9spm9hjn4frcd3r6o02gdhdbtd15.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "in.sminnovations.hemocube", - "certificate_hash": "7714b9268a81d0cf0fb178b0af8dbb630f8fc70a" - } - }, - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ], + "oauth_client": [], "api_key": [ { - "current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I" + "current_key": "AIzaSyC4d4GhWHr_NMJAeBvnztQ_yQ3Qe9MAnLs" } ], "services": { "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:650071678820:android:7569c1cad4fc99916c6471", - "android_client_info": { - "package_name": "in.sminnovations.hposregistration" - } - }, - "oauth_client": [ - { - "client_id": "650071678820-70kp5jvjda4r5diqch2kn4lc40p4f42g.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "in.sminnovations.hposregistration", - "certificate_hash": "7714b9268a81d0cf0fb178b0af8dbb630f8fc70a" - } - }, - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:650071678820:android:f96be19e5d43102b6c6471", - "android_client_info": { - "package_name": "in.sminnovations.hpostesting" - } - }, - "oauth_client": [ - { - "client_id": "650071678820-l87dnr0bdj95get0khgnvfv2an1k6ogq.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "in.sminnovations.hpostesting", - "certificate_hash": "7714b9268a81d0cf0fb178b0af8dbb630f8fc70a" - } - }, - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:650071678820:android:a53292637abb7c0d6c6471", - "android_client_info": { - "package_name": "in.sminnovations.hpostesting.dev" - } - }, - "oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com", - "client_type": 3 - } - ] + "other_platform_oauth_client": [] } } } ], "configuration_version": "1" -} +} \ No newline at end of file diff --git a/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt b/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt index 18b4e33..eb39e71 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt @@ -377,7 +377,7 @@ class HemoCubeFragment : Fragment() { hemoCubeViewModel.deviceMessages.postValue(currentResultData) when { - resultData.contains("SNE") && this.testStatusCode < TestStatus.CONFIG_COMPLETED.code -> { + (resultData.contains("SNE") || resultData.contains("SN"))&& this.testStatusCode < TestStatus.CONFIG_COMPLETED.code -> { processHardwareId(resultData) } @@ -394,7 +394,7 @@ class HemoCubeFragment : Fragment() { } } - resultData.contains("#SS1") && this.testStatusCode < TestStatus.SAMPLE_STARTED.code -> { + resultData.contains("#SS") && this.testStatusCode < TestStatus.SAMPLE_STARTED.code -> { this.testStatusCode = TestStatus.SAMPLE_STARTED.code activity?.runOnUiThread { binding.tvSubtitle4.text = getString(R.string.sample_started) @@ -402,7 +402,7 @@ class HemoCubeFragment : Fragment() { } } - resultData.contains("#SC1") && this.testStatusCode < TestStatus.SAMPLE_COMPLETED.code -> { + resultData.contains("#SC") && this.testStatusCode < TestStatus.SAMPLE_COMPLETED.code -> { this.testStatusCode = TestStatus.SAMPLE_COMPLETED.code hemoCubeViewModel.messages.postValue( getString(R.string.sample_completed) + "\n" + getString(R.string.gathering_data)) @@ -574,7 +574,7 @@ class HemoCubeFragment : Fragment() { } fun processHardwareId(resultData: String) { - val hardwareId = extractMiddleString(resultData) + val hardwareId = "HCV-000-3001" //extractMiddleString(resultData) if (!hardwareId.isNullOrBlank()) { updateDeviceId(hardwareId) diff --git a/app/src/main/java/com/example/hpostesting/presentation/testRight/UsbService.kt b/app/src/main/java/com/example/hpostesting/presentation/testRight/UsbService.kt index 5d3aab2..6f5e98e 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/testRight/UsbService.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/testRight/UsbService.kt @@ -34,7 +34,7 @@ class UsbService : Service() { fun connect(driver: UsbSerialDriver, connection: UsbDeviceConnection) { mPort = driver.ports[0] // Most devices have just one port (port 0) mPort.open(connection) - mPort.setParameters(115200, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE) + mPort.setParameters(9600, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE) isUsbConnected = true Log.d(TAG, "My Usb Connected ${mPort.driver}")