release 2.1.90 with upload flags
This commit is contained in:
@@ -16,11 +16,11 @@ android {
|
|||||||
|
|
||||||
// prod - production, preprod - preproduction, quality - qc, dev - development
|
// prod - production, preprod - preproduction, quality - qc, dev - development
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "in.sminnovations.hpostesting.quality"
|
applicationId "in.sminnovations.hpostesting.preprod"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 88
|
versionCode 90
|
||||||
versionName "2.1.88"
|
versionName "2.1.90"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
private var testStatusCode = 0.0
|
private var testStatusCode = 0.0
|
||||||
private var repeatReadingCount = 0
|
private var repeatReadingCount = 0
|
||||||
private var readingsPerSample = Constants.READINGS_PER_SAMPLE
|
private var readingsPerSample = Constants.READINGS_PER_SAMPLE
|
||||||
|
private var uploadedToCloud = false
|
||||||
|
private var uploadedToMolbio = false
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?,
|
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?,
|
||||||
@@ -140,10 +142,12 @@ class HemoCubeFragment : Fragment() {
|
|||||||
private fun observeViewModel() {
|
private fun observeViewModel() {
|
||||||
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
|
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
|
||||||
if (result == "Success") {
|
if (result == "Success") {
|
||||||
|
uploadedToCloud = true
|
||||||
showToast(R.string.test_upload)
|
showToast(R.string.test_upload)
|
||||||
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
||||||
when (it) {
|
when (it) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
|
uploadedToMolbio = true
|
||||||
if (Constants.MOLBIO_INTERGATION) {
|
if (Constants.MOLBIO_INTERGATION) {
|
||||||
it.data.data?.get(0)?.rawData?.let { it1 ->
|
it.data.data?.get(0)?.rawData?.let { it1 ->
|
||||||
hemoCubeViewModel.updateMolbioFlag(
|
hemoCubeViewModel.updateMolbioFlag(
|
||||||
@@ -160,6 +164,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
Toast.makeText(activity, "An error occurred: $message", Toast.LENGTH_LONG)
|
Toast.makeText(activity, "An error occurred: $message", Toast.LENGTH_LONG)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
handleReadingFinish()
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {}
|
else -> {}
|
||||||
@@ -224,7 +229,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun handleReadingFinish() {
|
private fun handleReadingFinish() {
|
||||||
if (allReadingsComplete()) {
|
if (allReadingsComplete() && uploadedToCloud) {
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.btnSubmit.visibility = View.GONE
|
binding.btnSubmit.visibility = View.GONE
|
||||||
val i = Intent(
|
val i = Intent(
|
||||||
|
|||||||
Reference in New Issue
Block a user