changes when we tested

This commit is contained in:
Mariya
2024-02-12 17:56:37 +05:30
parent 9314b155cd
commit 80eb658b07
6 changed files with 11 additions and 11 deletions

View File

@@ -16,11 +16,11 @@ android {
// dev - development, quality - qc, uat - User Acceptance Test, preprod - preproduction, prod - production // dev - development, quality - qc, uat - User Acceptance Test, preprod - preproduction, prod - production
defaultConfig { defaultConfig {
applicationId "in.sminnovations.hpostesting" applicationId "in.sminnovations.hpostesting.dev"
minSdk 21 minSdk 21
targetSdk 34 targetSdk 34
versionCode 102 versionCode 111
versionName "2.1.102" versionName "2.1.111"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@@ -159,7 +159,7 @@
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.example.hpostesting.fileprovider" android:authorities="com.example.hpostesting.dev.fileprovider"
android:exported="false" android:exported="false"
android:grantUriPermissions="true"> android:grantUriPermissions="true">
<meta-data <meta-data

View File

@@ -162,7 +162,7 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
val uri: Uri = FileProvider.getUriForFile( val uri: Uri = FileProvider.getUriForFile(
this, this,
"com.example.hpostesting.fileprovider", "com.example.hpostesting.dev.fileprovider",
file file
) )

View File

@@ -55,7 +55,7 @@ class GalleryFragment : Fragment() {
) { ) {
binding.btnDeviceProvision.visibility = View.VISIBLE binding.btnDeviceProvision.visibility = View.VISIBLE
} else { } else {
binding.btnDeviceProvision.visibility = View.GONE binding.btnDeviceProvision.visibility = View.VISIBLE
} }
binding.btnDeviceProvision.setOnClickListener { binding.btnDeviceProvision.setOnClickListener {

View File

@@ -182,11 +182,11 @@ class DeviceProvisionFragment : Fragment() {
private fun handleUsbData() { private fun handleUsbData() {
when { when {
resultData.contains("SNE") -> { resultData.contains("SNE") -> {
val pattern = Regex("HPP1-\\d{4}") val pattern = Regex("HCV-\\d{3}-\\d{4}")
val matchResult = pattern.find(resultData) val matchResult = pattern.find(resultData)
val hardwareId = matchResult?.value val hardwareId = matchResult?.value
if (hardwareId.toString().length == 9) { if (hardwareId.toString().length == 12) {
with(sharedPreferences.edit()) { with(sharedPreferences.edit()) {
putString(Constants.DEVICE_ID, hardwareId) putString(Constants.DEVICE_ID, hardwareId)
apply() apply()

View File

@@ -77,13 +77,13 @@
app:cornerRadius="16dp" app:cornerRadius="16dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_auto_dac" /> app:layout_constraintTop_toBottomOf="@id/btn_deviceProvision" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_deviceProvision" android:id="@+id/btn_deviceProvision"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" android:visibility="visible"
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:clickable="false" android:clickable="false"
@@ -92,7 +92,7 @@
app:cornerRadius="16dp" app:cornerRadius="16dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_deviceInfo" /> app:layout_constraintTop_toBottomOf="@id/btn_auto_dac" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_deviceInfo" android:id="@+id/btn_deviceInfo"