127 version, refresh buffer separated, added buffer flag, added remote config to manage threshold, remove cards direct test can be performed
This commit is contained in:
@@ -107,6 +107,7 @@ object Constants {
|
|||||||
const val DEVICE_ID = "DEVICE_ID"
|
const val DEVICE_ID = "DEVICE_ID"
|
||||||
const val LABNAME = "LAB_NAME"
|
const val LABNAME = "LAB_NAME"
|
||||||
const val CUVETTE_SIZE = "CUVETTE_SIZE"
|
const val CUVETTE_SIZE = "CUVETTE_SIZE"
|
||||||
|
const val LAST_UPDATED = "LAST_UPDATED"
|
||||||
const val IS_TOKEN_AVAILABLE = "IS_TOKEN_AVAILABLE"
|
const val IS_TOKEN_AVAILABLE = "IS_TOKEN_AVAILABLE"
|
||||||
const val BUFFER_LED_LOWER_BOUND = 21000
|
const val BUFFER_LED_LOWER_BOUND = 21000
|
||||||
const val BUFFER_LED_UPPER_BOUND = 23500
|
const val BUFFER_LED_UPPER_BOUND = 23500
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import com.example.hpostesting.data.model.patient.UserData
|
|||||||
|
|
||||||
@Database(
|
@Database(
|
||||||
entities = [UserData::class, HemoCubeTestData::class, DeviceData::class, BufferCheckData::class],
|
entities = [UserData::class, HemoCubeTestData::class, DeviceData::class, BufferCheckData::class],
|
||||||
version = 35,
|
version = 36,
|
||||||
exportSchema = false
|
exportSchema = false
|
||||||
)
|
)
|
||||||
@TypeConverters(Converters::class)
|
@TypeConverters(Converters::class)
|
||||||
|
|||||||
@@ -110,5 +110,6 @@ data class HemoCubeTestData(
|
|||||||
var cuvetteSize: String? = "",
|
var cuvetteSize: String? = "",
|
||||||
var district: String? = "",
|
var district: String? = "",
|
||||||
var centerName: String? = "",
|
var centerName: String? = "",
|
||||||
var ipAddress:String?= ""
|
var ipAddress:String?= "",
|
||||||
|
var configUpdatedRecent:String?= ""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
with(binding) {
|
with(binding) {
|
||||||
if (deviceType == Constants.DEVICE_TYPE_HEMOCUBE) {
|
if (deviceType == Constants.DEVICE_TYPE_HEMOCUBE) {
|
||||||
cvItem1.visibility = View.VISIBLE
|
cvItem1.visibility = View.VISIBLE
|
||||||
cvItem3.visibility = View.VISIBLE
|
cvItem3.visibility = View.GONE
|
||||||
cvItem2.visibility = View.GONE
|
cvItem2.visibility = View.GONE
|
||||||
cvItem4.visibility = View.GONE
|
cvItem4.visibility = View.GONE
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
when {
|
when {
|
||||||
device.productId == Constants.HOMO_CUBE_ID && device.vendorId == Constants.VENDOR_ID -> {
|
device.productId == Constants.HOMO_CUBE_ID && device.vendorId == Constants.VENDOR_ID -> {
|
||||||
binding.cvItem1.visibility = View.VISIBLE
|
binding.cvItem1.visibility = View.VISIBLE
|
||||||
binding.cvItem3.visibility = View.VISIBLE
|
binding.cvItem3.visibility = View.GONE
|
||||||
binding.cvItem2.visibility = View.GONE
|
binding.cvItem2.visibility = View.GONE
|
||||||
binding.cvItem4.visibility = View.GONE
|
binding.cvItem4.visibility = View.GONE
|
||||||
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
||||||
@@ -141,7 +141,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
device.productId == Constants.HEMO_CUBE_V2_PRODUCT_ID && device.vendorId == Constants.HEMO_CUBE_V2_VENDOR_ID -> {
|
device.productId == Constants.HEMO_CUBE_V2_PRODUCT_ID && device.vendorId == Constants.HEMO_CUBE_V2_VENDOR_ID -> {
|
||||||
binding.cvItem1.visibility = View.VISIBLE
|
binding.cvItem1.visibility = View.VISIBLE
|
||||||
binding.cvItem3.visibility = View.VISIBLE
|
binding.cvItem3.visibility = View.GONE
|
||||||
binding.cvItem2.visibility = View.GONE
|
binding.cvItem2.visibility = View.GONE
|
||||||
binding.cvItem4.visibility = View.GONE
|
binding.cvItem4.visibility = View.GONE
|
||||||
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
||||||
@@ -150,7 +150,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
device.productId == 24577 && device.vendorId == 1027 -> {
|
device.productId == 24577 && device.vendorId == 1027 -> {
|
||||||
binding.cvItem1.visibility = View.VISIBLE
|
binding.cvItem1.visibility = View.VISIBLE
|
||||||
binding.cvItem3.visibility = View.VISIBLE
|
binding.cvItem3.visibility = View.GONE
|
||||||
binding.cvItem2.visibility = View.GONE
|
binding.cvItem2.visibility = View.GONE
|
||||||
binding.cvItem4.visibility = View.GONE
|
binding.cvItem4.visibility = View.GONE
|
||||||
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_TRUEHEME)
|
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_TRUEHEME)
|
||||||
@@ -159,7 +159,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
device.productId == 8963 && device.vendorId == 1659 -> {
|
device.productId == 8963 && device.vendorId == 1659 -> {
|
||||||
binding.cvItem1.visibility = View.VISIBLE
|
binding.cvItem1.visibility = View.VISIBLE
|
||||||
binding.cvItem3.visibility = View.VISIBLE
|
binding.cvItem3.visibility = View.GONE
|
||||||
binding.cvItem2.visibility = View.GONE
|
binding.cvItem2.visibility = View.GONE
|
||||||
binding.cvItem4.visibility = View.GONE
|
binding.cvItem4.visibility = View.GONE
|
||||||
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
||||||
@@ -168,7 +168,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
device.productId == 4614 && device.vendorId == 7111 -> {
|
device.productId == 4614 && device.vendorId == 7111 -> {
|
||||||
binding.cvItem1.visibility = View.VISIBLE
|
binding.cvItem1.visibility = View.VISIBLE
|
||||||
binding.cvItem3.visibility = View.VISIBLE
|
binding.cvItem3.visibility = View.GONE
|
||||||
binding.cvItem2.visibility = View.GONE
|
binding.cvItem2.visibility = View.GONE
|
||||||
binding.cvItem4.visibility = View.GONE
|
binding.cvItem4.visibility = View.GONE
|
||||||
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
DataHolder.deviceType.postValue(Constants.DEVICE_TYPE_HEMOCUBE)
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import androidx.core.content.FileProvider
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.navigation.findNavController
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import com.example.hpostesting.data.constant.Constants
|
import com.example.hpostesting.data.constant.Constants
|
||||||
import com.example.hpostesting.data.constant.DataHolder
|
import com.example.hpostesting.data.constant.DataHolder
|
||||||
@@ -784,17 +785,25 @@ class HomeFragment : Fragment() {
|
|||||||
private fun setUserId() {
|
private fun setUserId() {
|
||||||
binding.btnSubmit.setOnClickListener {
|
binding.btnSubmit.setOnClickListener {
|
||||||
val userId = binding.userId.text.toString()
|
val userId = binding.userId.text.toString()
|
||||||
val bloodGroup = binding.etBloodGroup.text
|
val bloodGroup = binding.etBloodGroup.text.toString()
|
||||||
if (userId.length >= 5 && (!bloodGroup.equals("Select Blood Group") || !bloodGroup.isNullOrBlank())) {
|
if (userId.length >= 5 && bloodGroup != "Select Blood Group") {
|
||||||
hemoCubeViewModel.addUser(
|
DataHolder.selectedTest = UserData(
|
||||||
HemoCubeTestData(
|
_id = userId,
|
||||||
_id = userId,
|
bloodGroup = bloodGroup,
|
||||||
bloodGroup = bloodGroup.toString(),
|
incubationTime = SimpleDateFormat(
|
||||||
incubationTime = SimpleDateFormat(
|
|
||||||
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
||||||
).format(Calendar.getInstance().time).toString()
|
).format(Calendar.getInstance().time).toString()
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
findNavController().navigate(R.id.action_nav_home_to_mainActivity)
|
||||||
|
// hemoCubeViewModel.addUser(
|
||||||
|
// HemoCubeTestData(
|
||||||
|
// _id = userId,
|
||||||
|
// bloodGroup = bloodGroup.toString(),
|
||||||
|
// incubationTime = SimpleDateFormat(
|
||||||
|
// "yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
||||||
|
// ).format(Calendar.getInstance().time).toString()
|
||||||
|
// )
|
||||||
|
// )
|
||||||
Toast.makeText(requireContext(), "Successfully added- $userId", Toast.LENGTH_SHORT).show()
|
Toast.makeText(requireContext(), "Successfully added- $userId", Toast.LENGTH_SHORT).show()
|
||||||
binding.userId.setText("")
|
binding.userId.setText("")
|
||||||
// val userData = UserData(_id = userId)
|
// val userData = UserData(_id = userId)
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ class SlideshowFragment : Fragment(){
|
|||||||
binding.nameEditText.setText(sharedPreferences.getString(Constants.LABNAME,""))
|
binding.nameEditText.setText(sharedPreferences.getString(Constants.LABNAME,""))
|
||||||
|
|
||||||
selectedItem = sharedPreferences.getString(Constants.CUVETTE_SIZE,"10mm").toString()
|
selectedItem = sharedPreferences.getString(Constants.CUVETTE_SIZE,"10mm").toString()
|
||||||
|
val time = sharedPreferences.getString(Constants.LAST_UPDATED,"NA").toString()
|
||||||
|
binding.lastUpdated.text = "Last updated config: $time"
|
||||||
binding.btnGo.setOnClickListener {
|
binding.btnGo.setOnClickListener {
|
||||||
var labname = binding.nameEditText.text.toString()
|
var labname = binding.nameEditText.text.toString()
|
||||||
DataHolder.hemoCubeTestData?.apply {
|
DataHolder.hemoCubeTestData?.apply {
|
||||||
|
|||||||
@@ -186,7 +186,9 @@ class HemoCubeFragment : Fragment() {
|
|||||||
putBoolean(Constants.QUICK_CAPTURE, false)
|
putBoolean(Constants.QUICK_CAPTURE, false)
|
||||||
apply()
|
apply()
|
||||||
}
|
}
|
||||||
DataHolder.sampleReadCounter++
|
if(DataHolder.hemoCubeTestData!!.classificationResult != "Invalid"){
|
||||||
|
DataHolder.sampleReadCounter++
|
||||||
|
}
|
||||||
binding.btnSubmit.isEnabled = false
|
binding.btnSubmit.isEnabled = false
|
||||||
binding.btnSubmit.isClickable = false
|
binding.btnSubmit.isClickable = false
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
@@ -222,6 +224,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
binding.btnSamplestart.isClickable = true
|
binding.btnSamplestart.isClickable = true
|
||||||
binding.btnSamplestart.isEnabled = true
|
binding.btnSamplestart.isEnabled = true
|
||||||
}else{
|
}else{
|
||||||
|
isUsingExistingBuffer = false
|
||||||
hemoCubeViewModel.messages.postValue("Fresh Kit - Please take Buffer Blank reading")
|
hemoCubeViewModel.messages.postValue("Fresh Kit - Please take Buffer Blank reading")
|
||||||
binding.btnPlacebuffer.visibility = View.VISIBLE
|
binding.btnPlacebuffer.visibility = View.VISIBLE
|
||||||
binding.btnPlaceRefreshbuffer.visibility = View.GONE
|
binding.btnPlaceRefreshbuffer.visibility = View.GONE
|
||||||
@@ -260,6 +263,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
Log.d("HemoCubeFragment","Test Process started, reBuffer started")
|
Log.d("HemoCubeFragment","Test Process started, reBuffer started")
|
||||||
binding.testing.visibility = View.VISIBLE
|
binding.testing.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
isUsingExistingBuffer = false
|
||||||
refreshClick = true
|
refreshClick = true
|
||||||
if(checkRefreshCuvette){
|
if(checkRefreshCuvette){
|
||||||
startBufferProcess()
|
startBufferProcess()
|
||||||
@@ -624,6 +628,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
binding.btnPlaceRefreshbuffer.visibility = View.VISIBLE
|
binding.btnPlaceRefreshbuffer.visibility = View.VISIBLE
|
||||||
binding.btnPlacebuffer.visibility = View.GONE
|
binding.btnPlacebuffer.visibility = View.GONE
|
||||||
binding.btnSamplestart.visibility = View.VISIBLE
|
binding.btnSamplestart.visibility = View.VISIBLE
|
||||||
|
binding.btnSamplestart.isClickable = false
|
||||||
|
binding.btnSamplestart.isEnabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultData.contains("#AIN") && refreshClick && this.testStatusCode <= TestStatus.CUVETTE_ABSENTR.code -> {
|
resultData.contains("#AIN") && refreshClick && this.testStatusCode <= TestStatus.CUVETTE_ABSENTR.code -> {
|
||||||
@@ -631,6 +637,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
this.testStatusCode = TestStatus.CUVETTE_ABSENTR.code
|
this.testStatusCode = TestStatus.CUVETTE_ABSENTR.code
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.testing.visibility = View.GONE
|
binding.testing.visibility = View.GONE
|
||||||
|
binding.btnSamplestart.isClickable = false
|
||||||
|
binding.btnSamplestart.isEnabled = false
|
||||||
}
|
}
|
||||||
showRetryButtonForCuvette()
|
showRetryButtonForCuvette()
|
||||||
}
|
}
|
||||||
@@ -643,6 +651,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
binding.btnRetryCheckCuvette.visibility = View.GONE
|
binding.btnRetryCheckCuvette.visibility = View.GONE
|
||||||
binding.btnPlacebuffer.visibility = View.VISIBLE
|
binding.btnPlacebuffer.visibility = View.VISIBLE
|
||||||
binding.btnSamplestart.visibility = View.VISIBLE
|
binding.btnSamplestart.visibility = View.VISIBLE
|
||||||
|
binding.btnSamplestart.isClickable = false
|
||||||
|
binding.btnSamplestart.isEnabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultData.contains("#AIN") && this.testStatusCode <= TestStatus.CUVETTE_ABSENT.code -> {
|
resultData.contains("#AIN") && this.testStatusCode <= TestStatus.CUVETTE_ABSENT.code -> {
|
||||||
@@ -650,6 +660,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
this.testStatusCode = TestStatus.CUVETTE_ABSENT.code
|
this.testStatusCode = TestStatus.CUVETTE_ABSENT.code
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.testing.visibility = View.GONE
|
binding.testing.visibility = View.GONE
|
||||||
|
binding.btnSamplestart.isClickable = false
|
||||||
|
binding.btnSamplestart.isEnabled = false
|
||||||
}
|
}
|
||||||
showRetryButtonForCuvette()
|
showRetryButtonForCuvette()
|
||||||
}
|
}
|
||||||
@@ -733,8 +745,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
hemoCubeViewModel.messages.postValue(
|
hemoCubeViewModel.messages.postValue(
|
||||||
getString(R.string.sample_completed) + "\n" + getString(R.string.gathering_data)
|
getString(R.string.sample_completed) + "\n" + getString(R.string.gathering_data)
|
||||||
)
|
)
|
||||||
fetchResult()
|
|
||||||
currentResultData = ""
|
currentResultData = ""
|
||||||
|
fetchResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
resultData.contains("ovf") -> {
|
resultData.contains("ovf") -> {
|
||||||
@@ -956,7 +968,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
getString(R.string.data_collected_processing_data)
|
getString(R.string.data_collected_processing_data)
|
||||||
)
|
)
|
||||||
|
|
||||||
val resultLines = resultData.split("\\s+(?=LB|LS)".toRegex())
|
val resultLines = currentResultData.split("\\s+(?=LB|LS)".toRegex())
|
||||||
var bufferIntensity = resultLines[1].split(' ')[1].trim()
|
var bufferIntensity = resultLines[1].split(' ')[1].trim()
|
||||||
led1BufferForDevice = if (isUsingExistingBuffer) {
|
led1BufferForDevice = if (isUsingExistingBuffer) {
|
||||||
sharedPreferences.getString(Constants.BUFFER_VALUE_1, "")?.toDoubleOrNull()!!
|
sharedPreferences.getString(Constants.BUFFER_VALUE_1, "")?.toDoubleOrNull()!!
|
||||||
@@ -1110,7 +1122,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
val deviceRatio = led2Average / led1Average
|
val deviceRatio = led2Average / led1Average
|
||||||
val borderlineMetric = (led1Average - led2Average) / deviceRatio
|
val borderlineMetric = (led1Average - led2Average) / deviceRatio
|
||||||
// activity?.runOnUiThread {
|
// activity?.runOnUiThread {
|
||||||
// Toast.makeText(requireContext(),"led1Average: $led1Average, led2Average: $led2Average",Toast.LENGTH_LONG).show()
|
// Toast.makeText(requireContext(),"count: ${DataHolder.sampleReadCounter}",Toast.LENGTH_LONG).show()
|
||||||
// }
|
// }
|
||||||
if(led1Average < 0 || led2Average < 0){
|
if(led1Average < 0 || led2Average < 0){
|
||||||
hemoCubeViewModel.messages.postValue("Negative Absorbance - Repeat test with reading Buffer first and sample second")
|
hemoCubeViewModel.messages.postValue("Negative Absorbance - Repeat test with reading Buffer first and sample second")
|
||||||
@@ -1339,6 +1351,10 @@ class HemoCubeFragment : Fragment() {
|
|||||||
"%.3f".format(
|
"%.3f".format(
|
||||||
this.deviceRatio
|
this.deviceRatio
|
||||||
)
|
)
|
||||||
|
} : ${
|
||||||
|
"%.3f".format(
|
||||||
|
borderlineMetric
|
||||||
|
)
|
||||||
}"
|
}"
|
||||||
)
|
)
|
||||||
if (DataHolder.hemoCubeTestData?.testType == "HB")
|
if (DataHolder.hemoCubeTestData?.testType == "HB")
|
||||||
|
|||||||
@@ -422,6 +422,7 @@ class HemoCubeViewModel @Inject constructor(
|
|||||||
testDetails?.centerName = sharedPreference.getString(Constants.CENTER_NAME, "").toString()
|
testDetails?.centerName = sharedPreference.getString(Constants.CENTER_NAME, "").toString()
|
||||||
testDetails?.district = sharedPreference.getString(Constants.DISTRICT, "").toString()
|
testDetails?.district = sharedPreference.getString(Constants.DISTRICT, "").toString()
|
||||||
testDetails?.ipAddress = sharedPreference.getString(Constants.IP_ADDRESS, "").toString()
|
testDetails?.ipAddress = sharedPreference.getString(Constants.IP_ADDRESS, "").toString()
|
||||||
|
testDetails?.configUpdatedRecent = sharedPreference.getString(Constants.LAST_UPDATED, "NA").toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addResultTestToDb(quickCapture: Boolean) {
|
private fun addResultTestToDb(quickCapture: Boolean) {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import android.content.SharedPreferences
|
|||||||
import android.hardware.usb.UsbDevice
|
import android.hardware.usb.UsbDevice
|
||||||
import android.hardware.usb.UsbDeviceConnection
|
import android.hardware.usb.UsbDeviceConnection
|
||||||
import android.hardware.usb.UsbManager
|
import android.hardware.usb.UsbManager
|
||||||
|
import android.icu.text.SimpleDateFormat
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
@@ -49,6 +50,8 @@ import com.hoho.android.usbserial.driver.UsbSerialProber
|
|||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hpostesting.R
|
import `in`.sminnovations.hpostesting.R
|
||||||
import `in`.sminnovations.hpostesting.databinding.ActivityHemocubeBinding
|
import `in`.sminnovations.hpostesting.databinding.ActivityHemocubeBinding
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
open class HemocubeActivity : AppCompatActivity() {
|
open class HemocubeActivity : AppCompatActivity() {
|
||||||
@@ -158,7 +161,11 @@ open class HemocubeActivity : AppCompatActivity() {
|
|||||||
val bufferMaxLed1 = remoteConfig.getDouble("bufferMaxLed1")
|
val bufferMaxLed1 = remoteConfig.getDouble("bufferMaxLed1")
|
||||||
val bufferMinLed2 = remoteConfig.getDouble("bufferMinLed2")
|
val bufferMinLed2 = remoteConfig.getDouble("bufferMinLed2")
|
||||||
val bufferMaxLed2 = remoteConfig.getDouble("bufferMaxLed2")
|
val bufferMaxLed2 = remoteConfig.getDouble("bufferMaxLed2")
|
||||||
|
val time = SimpleDateFormat(
|
||||||
|
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
||||||
|
).format(Calendar.getInstance().time).toString()
|
||||||
with(sharedPreferences.edit()) {
|
with(sharedPreferences.edit()) {
|
||||||
|
putString(Constants.LAST_UPDATED, time)
|
||||||
putString("bufferMinLed1", bufferMinLed1.toString())
|
putString("bufferMinLed1", bufferMinLed1.toString())
|
||||||
putString("bufferMaxLed1", bufferMaxLed1.toString())
|
putString("bufferMaxLed1", bufferMaxLed1.toString())
|
||||||
putString("bufferMinLed2", bufferMinLed2.toString())
|
putString("bufferMinLed2", bufferMinLed2.toString())
|
||||||
|
|||||||
@@ -133,6 +133,7 @@
|
|||||||
android:id="@+id/cv_item3"
|
android:id="@+id/cv_item3"
|
||||||
android:layout_width="128dp"
|
android:layout_width="128dp"
|
||||||
android:layout_height="128dp"
|
android:layout_height="128dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="32dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
app:cardElevation="8dp"
|
app:cardElevation="8dp"
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
android:id="@+id/et_blood_group"
|
android:id="@+id/et_blood_group"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/select_blood_group"
|
android:text="@string/select_blood_group"
|
||||||
android:inputType="none"
|
android:inputType="none"
|
||||||
android:labelFor="@id/til_blood_group"
|
android:labelFor="@id/til_blood_group"
|
||||||
app:simpleItems="@array/blood_group" />
|
app:simpleItems="@array/blood_group" />
|
||||||
@@ -143,6 +143,7 @@
|
|||||||
android:id="@+id/rv_order_offline"
|
android:id="@+id/rv_order_offline"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:visibility="gone"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
@@ -86,16 +86,26 @@
|
|||||||
android:text="@string/add"
|
android:text="@string/add"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/spinnerCuvette"
|
app:layout_constraintBottom_toBottomOf="@id/spinnerCuvette"
|
||||||
|
|
||||||
app:layout_constraintStart_toEndOf="@id/spinnerCuvette"
|
app:layout_constraintStart_toEndOf="@id/spinnerCuvette"
|
||||||
app:layout_constraintTop_toTopOf="@id/spinnerCuvette" />
|
app:layout_constraintTop_toTopOf="@id/spinnerCuvette" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/last_updated"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:text="Last"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="17sp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btn_add_size"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginStart="30dp"/>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/spinnerCuvette"
|
app:layout_constraintTop_toBottomOf="@+id/last_updated"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="10dp"/>
|
android:layout_marginTop="10dp"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user