toast messages added for

If the entered kit number is valid, the application shall proceed with the intended operation.
provide a clear indication that the application is in offline mode.
This commit is contained in:
Mariya
2024-05-08 14:51:34 +05:30
parent 3fd36080ec
commit ef620371f3
3 changed files with 9 additions and 0 deletions

View File

@@ -171,6 +171,12 @@ class KitScanActivity : AppCompatActivity(), IDcsSdkApiDelegate {
binding.btnGo.setOnClickListener {
val serialNumber = binding.nameEditText.text.toString().trim()
if (serialNumber.isNotEmpty() && isSerialValid(serialNumber)) {
Toast.makeText(
applicationContext,
R.string.kit_update,
Toast.LENGTH_LONG
).show()
if (DataHolder.selectedTest == null) {
with(sharedPreference.edit()) {
putString(

View File

@@ -24,6 +24,7 @@ import android.content.DialogInterface
import android.content.Intent
import android.content.IntentFilter
import android.content.SharedPreferences
import android.health.connect.datatypes.units.Length
import android.net.Uri
import android.os.BatteryManager
import android.os.Build
@@ -328,6 +329,7 @@ class HomeFragment : Fragment() {
binding.internetAvailableCL.visibility = View.GONE
binding.pendingTest.visibility = View.GONE
binding.internetNotAvailableCL.visibility = View.VISIBLE
Toast.makeText(requireContext(),R.string.internet_not_available_please_enter_the_user_id_manually,Toast.LENGTH_LONG).show()
setUserId()
}
wasConnected = isConnected

View File

@@ -249,6 +249,7 @@
<string name="do_log_out">Do you want to LogOut the Application?</string>
<string name="cancelled_unable_scan">Cancelled: Unable to scan, Try Again!!</string>
<string name="kit_updated">Kit number is updated, Please Select user before starting test</string>
<string name="kit_update">Kit number is updated.</string>
<string name="select_patient">Please Select patient before starting test</string>
<string name="enable_location">Please enable location services</string>
<string name="location_denied">Fine location permission denied</string>