Compare commits
8 Commits
dev-check-
...
ui-ux
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
304f413364 | ||
|
|
f1b03c93a2 | ||
|
|
dded6976f6 | ||
|
|
b1d10d5403 | ||
|
|
9cf7fae2ec | ||
|
|
ef419d8a71 | ||
|
|
3317df4f70 | ||
|
|
6bdd1da9da |
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="com.example.hpostesting.HPOSTestingApplication"
|
android:name="com.example.hpostesting.HPOSTestingApplication"
|
||||||
android:largeHeap="true"
|
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ object Constants {
|
|||||||
const val DOCUMENT_ID_FOR_UPDATE ="2o71vBKLqdgEKYtFG8Lb"
|
const val DOCUMENT_ID_FOR_UPDATE ="2o71vBKLqdgEKYtFG8Lb"
|
||||||
const val ABHA_APP_PACKAGE = "in.ndhm.phr"
|
const val ABHA_APP_PACKAGE = "in.ndhm.phr"
|
||||||
|
|
||||||
const val MOLBIO_INTEGRATION = true
|
const val MOLBIO_INTEGRATION = false
|
||||||
const val deviceProvisionEmail = "HPOS_provisioner@bigtec.co.in"
|
const val deviceProvisionEmail = "HPOS_provisioner@bigtec.co.in"
|
||||||
const val deviceProvisionPassword = "f2ab0e7f9d69"
|
const val deviceProvisionPassword = "f2ab0e7f9d69"
|
||||||
const val DEVICE_ID_API = "deviceIDAPI"
|
const val DEVICE_ID_API = "deviceIDAPI"
|
||||||
|
|||||||
@@ -10,7 +10,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 = 28,
|
version = 27,
|
||||||
exportSchema = false
|
exportSchema = false
|
||||||
)
|
)
|
||||||
@TypeConverters(Converters::class)
|
@TypeConverters(Converters::class)
|
||||||
|
|||||||
@@ -109,7 +109,20 @@ class DatabaseRepository @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun addTestToDatabase(data: UserData?): Response<String> {
|
override suspend fun addTestToDatabase(data: UserData?): Response<String> {
|
||||||
TODO("Not yet implemented")
|
return try {
|
||||||
|
val userdata =
|
||||||
|
db.collection("patientData").whereEqualTo("_id", data!!._id).get().await()
|
||||||
|
if (userdata.documents.isNotEmpty()) {
|
||||||
|
userdata.documents.forEach {
|
||||||
|
db.collection("patientData").document(it.id).update("testStatus", true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.collection("testData").add(data).await()
|
||||||
|
Response.Success(data._id)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Firebase.crashlytics.recordException(e)
|
||||||
|
Response.Error(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun addTestToDatabaseforBufferCheck(data: BufferCheckData?): Response<String> {
|
override suspend fun addTestToDatabaseforBufferCheck(data: BufferCheckData?): Response<String> {
|
||||||
@@ -234,22 +247,4 @@ class DatabaseRepository @Inject constructor(
|
|||||||
override fun <UserData> addTestToDatabase(testDetails: UserData): Any {
|
override fun <UserData> addTestToDatabase(testDetails: UserData): Any {
|
||||||
TODO("Not yet implemented")
|
TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun addTestToDatabasefornew(data: HemoCubeTestData?): Response<String> {
|
|
||||||
return try {
|
|
||||||
val userdata =
|
|
||||||
db.collection("patientData").whereEqualTo("_id", data!!._id).get().await()
|
|
||||||
if (userdata.documents.isNotEmpty()) {
|
|
||||||
userdata.documents.forEach {
|
|
||||||
db.collection("patientData").document(it.id).update("testStatus", true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
db.collection("testData").add(data).await()
|
|
||||||
Response.Success(data._id)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Firebase.crashlytics.recordException(e)
|
|
||||||
Response.Error(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,6 @@ import okhttp3.ResponseBody
|
|||||||
|
|
||||||
interface Repository {
|
interface Repository {
|
||||||
suspend fun addTestToDatabase(data: HemoCubeTestData?): Response<String>
|
suspend fun addTestToDatabase(data: HemoCubeTestData?): Response<String>
|
||||||
suspend fun addTestToDatabasefornew(data: HemoCubeTestData?): Response<String>
|
|
||||||
|
|
||||||
suspend fun addTestToDatabase(data: UserData?): Response<String>
|
suspend fun addTestToDatabase(data: UserData?): Response<String>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.example.hpostesting.presentation.dashboard
|
package com.example.hpostesting.presentation.dashboard
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.app.DownloadManager
|
||||||
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
@@ -23,7 +24,7 @@ import androidx.navigation.ui.setupWithNavController
|
|||||||
import com.example.hpostesting.data.Result
|
import com.example.hpostesting.data.Result
|
||||||
import com.example.hpostesting.data.constant.Constants
|
import com.example.hpostesting.data.constant.Constants
|
||||||
import com.example.hpostesting.data.constant.LanguageManager
|
import com.example.hpostesting.data.constant.LanguageManager
|
||||||
import com.example.hpostesting.data.model.updates.DeviceUpdateRequest
|
import com.example.hpostesting.data.model.patient.DeviceData
|
||||||
import com.example.hpostesting.presentation.NatsManager
|
import com.example.hpostesting.presentation.NatsManager
|
||||||
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
|
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
|
||||||
import com.example.hpostesting.presentation.jig.JigActivity
|
import com.example.hpostesting.presentation.jig.JigActivity
|
||||||
@@ -34,16 +35,10 @@ import com.google.firebase.crashlytics.FirebaseCrashlytics
|
|||||||
import com.google.firebase.firestore.ktx.firestore
|
import com.google.firebase.firestore.ktx.firestore
|
||||||
import com.google.firebase.ktx.Firebase
|
import com.google.firebase.ktx.Firebase
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hpostesting.BuildConfig
|
|
||||||
import `in`.sminnovations.hpostesting.R
|
import `in`.sminnovations.hpostesting.R
|
||||||
import `in`.sminnovations.hpostesting.databinding.ActivityDashboardBinding
|
import `in`.sminnovations.hpostesting.databinding.ActivityDashboardBinding
|
||||||
import okhttp3.ResponseBody
|
import okhttp3.ResponseBody
|
||||||
import java.io.BufferedInputStream
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileInputStream
|
|
||||||
import java.io.FileOutputStream
|
|
||||||
import java.io.InputStream
|
|
||||||
import java.util.zip.ZipInputStream
|
|
||||||
|
|
||||||
interface NatsMessageCallback {
|
interface NatsMessageCallback {
|
||||||
fun onMessageReceived(topic: String, message: String)
|
fun onMessageReceived(topic: String, message: String)
|
||||||
@@ -58,7 +53,7 @@ open interface IDataCollector: NatsMessageCallback {
|
|||||||
class DashboardActivity : AppCompatActivity(), IDataCollector {
|
class DashboardActivity : AppCompatActivity(), IDataCollector {
|
||||||
|
|
||||||
val TAG = "DashboardActivity"
|
val TAG = "DashboardActivity"
|
||||||
private var isRegistered = false
|
private var isRegistered= false
|
||||||
private lateinit var appBarConfiguration: AppBarConfiguration
|
private lateinit var appBarConfiguration: AppBarConfiguration
|
||||||
private lateinit var binding: ActivityDashboardBinding
|
private lateinit var binding: ActivityDashboardBinding
|
||||||
lateinit var sharedPreferences: SharedPreferences
|
lateinit var sharedPreferences: SharedPreferences
|
||||||
@@ -67,7 +62,7 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
|||||||
private var downloadId: Long = 0
|
private var downloadId: Long = 0
|
||||||
// TODO: Remove hemocube viewmodel
|
// TODO: Remove hemocube viewmodel
|
||||||
private val hemocubeViewModel: HemoCubeViewModel by viewModels()
|
private val hemocubeViewModel: HemoCubeViewModel by viewModels()
|
||||||
private lateinit var sharedPreference: SharedPreferences
|
|
||||||
override fun attachBaseContext(newBase: Context?) {
|
override fun attachBaseContext(newBase: Context?) {
|
||||||
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
|
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
|
||||||
LanguageManager.setLocale(newBase, languageCode)
|
LanguageManager.setLocale(newBase, languageCode)
|
||||||
@@ -80,7 +75,6 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
|||||||
Log.d(TAG, "Received message on topic $topic: $message")
|
Log.d(TAG, "Received message on topic $topic: $message")
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetWorldReadable")
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
@@ -102,22 +96,15 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
|||||||
when (result) {
|
when (result) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
// Handle success
|
// Handle success
|
||||||
val apk = result.data
|
val apkUrl = result.data
|
||||||
val file = File(getExternalFilesDir("Updates"), "update.apk")
|
// val apkUrl = "https://dl.dropboxusercontent.com/s/fi/1c3nn7t0co431hicl3hrt/app-debug.apk?rlkey=e4uf13ty1dpcked614vy1aaqp&dl=0"
|
||||||
file.setReadable(true, false) // Ensure the file is readable
|
initiateUpdate(apkUrl.toString())
|
||||||
apk.byteStream().use { input ->
|
Log.d("ApI", "APK URL: $apkUrl")
|
||||||
file.outputStream().use { output ->
|
// Toast.makeText(
|
||||||
input.copyTo(output)
|
// this,
|
||||||
}
|
// "APK UPLOAD ${result.data}",
|
||||||
}
|
// Toast.LENGTH_SHORT
|
||||||
Log.d("Responsebodyformat", "Responsebodyformat: ")
|
// ).show()
|
||||||
installApk(file)
|
|
||||||
Log.e("ApI", "APK URL: $apk")
|
|
||||||
Toast.makeText(
|
|
||||||
this,
|
|
||||||
"${result.data}",
|
|
||||||
Toast.LENGTH_SHORT
|
|
||||||
).show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
@@ -167,15 +154,55 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
|||||||
return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
|
return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun initiateUpdate(url: String) {
|
||||||
|
val apkUrl = url
|
||||||
|
if (!isValidHttpUrl(apkUrl)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val request = DownloadManager.Request(Uri.parse(apkUrl))
|
||||||
|
request.setTitle("App Update")
|
||||||
|
request.setDescription("Downloading update...")
|
||||||
|
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
|
||||||
|
request.setDestinationInExternalFilesDir(this, "Updates", "update.apk")
|
||||||
|
|
||||||
|
val downloadManager = getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
|
||||||
|
downloadId = downloadManager.enqueue(request)
|
||||||
|
|
||||||
|
// Register a BroadcastReceiver to receive the download complete event
|
||||||
|
val filter = IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
isRegistered = true
|
||||||
|
registerReceiver(downloadReceiver, filter, RECEIVER_EXPORTED)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private fun extractApkUrl(responseBody: ResponseBody): String {
|
||||||
|
return responseBody.string()
|
||||||
|
}
|
||||||
|
private fun isValidHttpUrl(url: String): Boolean {
|
||||||
|
return url.startsWith("http://") || url.startsWith("https://")
|
||||||
|
}
|
||||||
|
private val downloadReceiver = object : BroadcastReceiver() {
|
||||||
|
override fun onReceive(context: Context?, intent: Intent?) {
|
||||||
|
val id = intent?.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1)
|
||||||
|
if (id == downloadId) {
|
||||||
|
installApk()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun installApk() {
|
||||||
|
val file = File(getExternalFilesDir("Updates"), "update.apk")
|
||||||
|
file.setReadable(true, false) // Ensure the file is readable
|
||||||
|
|
||||||
private fun installApk(file: File) {
|
|
||||||
val pInfo = baseContext.packageManager.getPackageInfo(baseContext.packageName, 0)
|
val pInfo = baseContext.packageManager.getPackageInfo(baseContext.packageName, 0)
|
||||||
val uri: Uri = FileProvider.getUriForFile(
|
val uri: Uri = FileProvider.getUriForFile(
|
||||||
this,
|
this,
|
||||||
"${BuildConfig.APPLICATION_ID}.fileprovider",
|
"in.sminnovations.hpostesting.dev.fileprovider",
|
||||||
file
|
file
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Create an intent to install the APK
|
||||||
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
|
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
|
||||||
installIntent.data = uri
|
installIntent.data = uri
|
||||||
installIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or
|
installIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or
|
||||||
@@ -191,13 +218,14 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
if(isRegistered) {
|
try {
|
||||||
try {
|
if (isRegistered){
|
||||||
unregisterReceiver(downloadReceiver)
|
unregisterReceiver(downloadReceiver)
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.d("HomeFragment", e.toString())
|
|
||||||
}
|
}
|
||||||
|
}catch (e: IllegalArgumentException){
|
||||||
|
Log.e("HOmeFragment",e.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,14 +278,6 @@ class DashboardActivity : AppCompatActivity(), IDataCollector {
|
|||||||
override fun setResponse(response: String) {
|
override fun setResponse(response: String) {
|
||||||
responses = responses+response+"\n"
|
responses = responses+response+"\n"
|
||||||
println(responses)
|
println(responses)
|
||||||
// if (response.contains("checkUpdate")) {
|
Log.d("DashBoardActResponse",response)
|
||||||
// hemocubeViewModel.deviceUpdate(createDeviceUpdateRequestData())
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createDeviceUpdateRequestData(): DeviceUpdateRequest {
|
|
||||||
return DeviceUpdateRequest(
|
|
||||||
serial_no = sharedPreference.getString(Constants.DEVICE_ID, "")
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,6 @@ import android.app.DownloadManager
|
|||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Context.BATTERY_SERVICE
|
import android.content.Context.BATTERY_SERVICE
|
||||||
import android.content.Context.RECEIVER_EXPORTED
|
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
@@ -21,7 +20,7 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.annotation.RequiresApi
|
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.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
@@ -72,8 +71,8 @@ import java.util.zip.ZipInputStream
|
|||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class HomeFragment : Fragment() {
|
class HomeFragment : Fragment() {
|
||||||
private var isRegistered = false
|
|
||||||
private var downloadId: Long = 0
|
private var downloadId: Long = 0
|
||||||
|
private var isRegistered = false
|
||||||
private lateinit var binding: FragmentHomeBinding
|
private lateinit var binding: FragmentHomeBinding
|
||||||
private val viewModel: TestRightViewModel by activityViewModels()
|
private val viewModel: TestRightViewModel by activityViewModels()
|
||||||
private val hemoCubeViewModel: HemoCubeViewModel by activityViewModels()
|
private val hemoCubeViewModel: HemoCubeViewModel by activityViewModels()
|
||||||
@@ -99,12 +98,10 @@ class HomeFragment : Fragment() {
|
|||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.P)
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
if (sharedPreference.getString(Constants.USER_ID, "").toString() == "ADMIN") {
|
if (sharedPreference.getString(Constants.USER_ID, "").toString() == "ADMIN") {
|
||||||
binding.labelQuickCapture.visibility = View.VISIBLE
|
|
||||||
binding.btnQuickCapture.visibility = View.VISIBLE
|
binding.btnQuickCapture.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,67 +146,35 @@ class HomeFragment : Fragment() {
|
|||||||
checkForTokenAndUpdate()
|
checkForTokenAndUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now re-subscribe to allUserData
|
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
||||||
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { originalUserDataList ->
|
val resultList = MolbioV2ResultRequest(mutableListOf(MolbioV2Result()))
|
||||||
|
userDataList.forEach { userData ->
|
||||||
Log.d("LOCAL_DB OBSERVE", "OBSERVE CALLED")
|
if (!userData.molbioFlag && isTokenAvailable && Constants.MOLBIO_INTEGRATION) {
|
||||||
|
resultList.results?.add(
|
||||||
val resultList = MolbioV2ResultRequest(mutableListOf())
|
MolbioV2Result(
|
||||||
originalUserDataList.forEach { userData ->
|
rawData = userData,
|
||||||
Log.d(
|
analysisId = userData._id,
|
||||||
": USER DATA",
|
analysisDate = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
originalUserDataList.count().toString() + " : " + userData._id
|
analysisStatus = userData.classificationResult,
|
||||||
)
|
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
||||||
var accessToken = sharedPreference.getString(Constants.ACCESS_TOKEN, "").toString()
|
interpretation = userData.classificationResult,
|
||||||
// Upload results after processing all userData to avoid duplicates and ensure all modifications are done
|
testId = userData._id,
|
||||||
if(accessToken.isNotEmpty()) {
|
testTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
if (!userData.molbioFlag && isTokenAvailable && Constants.MOLBIO_INTEGRATION) {
|
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
val currentTimeFormatted = SimpleDateFormat(
|
expiryTime = "2024-02-08 16:33:56"//userData.testTime,
|
||||||
"yyyy-MM-dd'T'HH:mm:ssZZZZZ",
|
|
||||||
Locale.getDefault()
|
|
||||||
).format(Calendar.getInstance().time)
|
|
||||||
val bufferIntensityThreshold =
|
|
||||||
Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId]?.toString()
|
|
||||||
?: "defaultThreshold" // Handle possible nulls safely
|
|
||||||
resultList.results?.add(
|
|
||||||
MolbioV2Result(
|
|
||||||
rawData = userData,
|
|
||||||
analysisId = userData._id,
|
|
||||||
analysisDate = currentTimeFormatted,
|
|
||||||
analysisStatus = userData.classificationResult
|
|
||||||
?: "defaultStatus", // Handle possible nulls
|
|
||||||
thresholds = bufferIntensityThreshold,
|
|
||||||
interpretation = userData.classificationResult
|
|
||||||
?: "defaultInterpretation", // Handle possible nulls
|
|
||||||
testId = userData._id,
|
|
||||||
testTime = currentTimeFormatted,
|
|
||||||
collectionTime = currentTimeFormatted,
|
|
||||||
expiryTime = currentTimeFormatted
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
}
|
if (!userData.molbioFlag && isTokenAvailable && Constants.MOLBIO_INTEGRATION) {
|
||||||
Log.d("USER DATA LIST SIZE", resultList.results?.count().toString())
|
userData.molbioFlag = true
|
||||||
|
hemoCubeViewModel.uploadResult(resultList)
|
||||||
resultList.results?.forEach { result ->
|
}
|
||||||
val userData = result.rawData
|
|
||||||
Log.d("UserData", userData.toString())
|
if (!userData.localFlag) {
|
||||||
if (userData != null) {
|
userData.localFlag = true
|
||||||
if (!userData.localFlag) {
|
hemoCubeViewModel.bulkAddResultTestToDb(userData)
|
||||||
hemoCubeViewModel.bulkAddResultTestToDb(userData)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
resultList.results?.forEach { result ->
|
|
||||||
result.rawData?.let { sanitizeDoubleValues(it) }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Then, check if there are any results to upload.
|
|
||||||
if (resultList.results?.isNotEmpty() == true) {
|
|
||||||
hemoCubeViewModel.uploadResult(resultList)
|
|
||||||
Log.d("resultcount1", "Uploading sanitized results")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -237,7 +202,7 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding.uploadData.setOnClickListener {
|
binding.uploadData.setOnClickListener {
|
||||||
// showUploadDialog(requireContext())
|
showUploadDialog(requireContext())
|
||||||
}
|
}
|
||||||
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userData ->
|
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userData ->
|
||||||
|
|
||||||
@@ -286,32 +251,41 @@ class HomeFragment : Fragment() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.P)
|
|
||||||
private fun checkForTokenAndUpdate() {
|
private fun checkForTokenAndUpdate() {
|
||||||
var accessToken = sharedPreference.getString(Constants.ACCESS_TOKEN, "").toString()
|
var accessToken = sharedPreference.getString(Constants.ACCESS_TOKEN, "").toString()
|
||||||
var password = sharedPreference.getString(Constants.DEVICE_PASSWORD_API, "").toString()
|
var password = sharedPreference.getString(Constants.DEVICE_PASSWORD_API, "").toString()
|
||||||
var userID = sharedPreference.getString(Constants.DEVICE_ID_API, "").toString()
|
var userID = sharedPreference.getString(Constants.DEVICE_ID_API, "").toString()
|
||||||
deviceId = sharedPreference.getString(Constants.DEVICE_ID, "").toString()
|
deviceId = sharedPreference.getString(Constants.DEVICE_ID, "").toString()
|
||||||
if(userID.isNotEmpty() && password.isNotEmpty()) {
|
if (userID.isNotEmpty() && password.isNotEmpty()) {
|
||||||
Log.d("istoken",isTokenAvailable.toString())
|
if (!isTokenAvailable) {
|
||||||
if (!isTokenAvailable) {
|
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
||||||
Log.d("istoken1",isTokenAvailable.toString())
|
} else {
|
||||||
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
if (isTokenExpired(accessToken)) {
|
||||||
isTokenAvailable = true
|
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
||||||
|
} else {
|
||||||
|
isTokenAvailable = true
|
||||||
|
|
||||||
}else if(isTokenAvailable){
|
hemoCubeViewModel.deviceUpdate(createDeviceUpdateRequestData())
|
||||||
Log.d("istoken7",isTokenAvailable.toString())
|
hemoCubeViewModel.uploadLogs()
|
||||||
isTokenAvailable = true
|
hemoCubeViewModel.startPeriodicCheckUpdate()
|
||||||
hemoCubeViewModel.startPeriodicCheckUpdate()
|
hemoCubeViewModel.downloadClientCertificate()
|
||||||
hemoCubeViewModel.checkUpdate(createCheckUpdateRequestData())
|
}
|
||||||
}else{
|
}
|
||||||
if(isTokenExpired(accessToken)) {
|
} else if (deviceId.isNotEmpty()) {
|
||||||
Log.d("istoken8",isTokenAvailable.toString())
|
|
||||||
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (userID.isEmpty() && password.isEmpty() && deviceId.isNotEmpty()) {
|
|
||||||
fetchDeviceCredentials()
|
fetchDeviceCredentials()
|
||||||
|
// This code will execute after credentials have been successfully fetched and stored.
|
||||||
|
userID = sharedPreference.getString("username", "").toString()
|
||||||
|
password = sharedPreference.getString("password", "").toString()
|
||||||
|
accessToken = sharedPreference.getString(Constants.ACCESS_TOKEN, "").toString()
|
||||||
|
if (accessToken.isEmpty()) {
|
||||||
|
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
||||||
|
} else {
|
||||||
|
// Continue with your existing logic if the token is not empty.
|
||||||
|
isTokenAvailable = true
|
||||||
|
hemoCubeViewModel.deviceUpdate(createDeviceUpdateRequestData())
|
||||||
|
hemoCubeViewModel.uploadLogs()
|
||||||
|
hemoCubeViewModel.startPeriodicCheckUpdate()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
@@ -324,9 +298,6 @@ class HomeFragment : Fragment() {
|
|||||||
when (response) {
|
when (response) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
updateTokens(response)
|
updateTokens(response)
|
||||||
response.data.data?.accessToken
|
|
||||||
isTokenAvailable = true
|
|
||||||
Log.d("istoken2",isTokenAvailable.toString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
@@ -348,36 +319,6 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
|
||||||
when (it) {
|
|
||||||
is Result.Success -> {
|
|
||||||
|
|
||||||
Log.d("success,","uploded")
|
|
||||||
it.data.data?.forEach { id ->
|
|
||||||
id.rawData?.let { it1 ->
|
|
||||||
hemoCubeViewModel.updateMolbioFlag(
|
|
||||||
it1._id
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Toast.makeText(activity, "Molbio Result is successfully uploaded", Toast.LENGTH_LONG)
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
is Result.Error -> {
|
|
||||||
binding.btnSubmit.visibility = View.VISIBLE
|
|
||||||
//Remove this line of code while deploying to IOCL
|
|
||||||
it.exception.let { message ->
|
|
||||||
Toast.makeText(activity, "$message", Toast.LENGTH_LONG)
|
|
||||||
.show()
|
|
||||||
Log.d("resultuploadfail", message.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hemoCubeViewModel.uploadLogs.observe(viewLifecycleOwner) { response ->
|
hemoCubeViewModel.uploadLogs.observe(viewLifecycleOwner) { response ->
|
||||||
when (response) {
|
when (response) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
@@ -386,14 +327,13 @@ class HomeFragment : Fragment() {
|
|||||||
// "Log uploaded ${response.data.data?.filename}",
|
// "Log uploaded ${response.data.data?.filename}",
|
||||||
// Toast.LENGTH_SHORT
|
// Toast.LENGTH_SHORT
|
||||||
// ).show()
|
// ).show()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
response.exception.let { message ->
|
response.exception.let { message ->
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
activity,
|
activity,
|
||||||
"$message",
|
"An error occurred in uploading logs: $message",
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
)
|
)
|
||||||
.show()
|
.show()
|
||||||
@@ -408,84 +348,28 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hemoCubeViewModel.checkUpdate.observe(viewLifecycleOwner) { response ->
|
|
||||||
when (response) {
|
|
||||||
is Result.Success -> {
|
|
||||||
val updatedversion = response.data.data?.version.toString()
|
|
||||||
val currentversion =
|
|
||||||
context?.let { ctx ->
|
|
||||||
val packageInfo = ctx.packageManager.getPackageInfo(ctx.packageName, 0)
|
|
||||||
val versionName = packageInfo.versionName
|
|
||||||
val versionCode: Long = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
||||||
// From Android P (API level 28), versionCode is deprecated and you should use longVersionCode instead.
|
|
||||||
packageInfo.longVersionCode
|
|
||||||
} else {
|
|
||||||
// For older Android versions, use versionCode (cast it to Long for consistency).
|
|
||||||
packageInfo.versionCode.toLong()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use versionName and versionCode as needed
|
|
||||||
Log.d("AppInfo", "Version Name: $versionName, Version Code: $versionCode")
|
|
||||||
}
|
|
||||||
Log.d("versionnow",currentversion.toString())
|
|
||||||
Log.d("versionnow",updatedversion.toString())
|
|
||||||
if(updatedversion > currentversion.toString()){
|
|
||||||
hemoCubeViewModel.deviceUpdate(createDeviceUpdateRequestData())
|
|
||||||
Toast.makeText(
|
|
||||||
activity,
|
|
||||||
"new version ${response.data.data?.version} Available",
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
)
|
|
||||||
.show()
|
|
||||||
}else{
|
|
||||||
Toast.makeText(
|
|
||||||
activity,
|
|
||||||
"App is Up to date",
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
)
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
is Result.Error -> {
|
|
||||||
// response.exception.let { message ->
|
|
||||||
//// Toast.makeText(
|
|
||||||
//// activity,
|
|
||||||
//// "$message",
|
|
||||||
//// Toast.LENGTH_LONG
|
|
||||||
//// )
|
|
||||||
//// .show()
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
is Result.Loading -> {
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hemoCubeViewModel.downloadcertificate.observe(viewLifecycleOwner) { response ->
|
hemoCubeViewModel.downloadcertificate.observe(viewLifecycleOwner) { response ->
|
||||||
when (response) {
|
when (response) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
val url = response.data
|
val url = response.data
|
||||||
|
|
||||||
val downloadDirectory = "NATS"
|
|
||||||
val fileName = "nats_certificate.zip"
|
val fileName = "nats_certificate.zip"
|
||||||
val unzipDirectoryPath = requireContext().getExternalFilesDir(null)?.absolutePath + "/$downloadDirectory"
|
val downloadDirectory = "NATS"
|
||||||
|
|
||||||
// Check if the directory with extracted files exists.
|
|
||||||
val directory = File(unzipDirectoryPath)
|
|
||||||
if (directory.exists() && directory.isDirectory) {
|
|
||||||
// Assuming if the directory exists, the certificate has been downloaded and extracted.
|
|
||||||
// You can add more specific checks here, e.g., checking for specific files within the directory.
|
|
||||||
Toast.makeText(requireContext(), "NATS certificate already downloaded and extracted.", Toast.LENGTH_SHORT).show()
|
|
||||||
return@observe
|
|
||||||
}
|
|
||||||
val file = downloadFile(url, requireContext(), fileName, downloadDirectory)
|
val file = downloadFile(url, requireContext(), fileName, downloadDirectory)
|
||||||
|
Toast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
"NATS certificate Downloaded",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
|
||||||
|
val unzipDirectoryPath =
|
||||||
|
requireContext().getExternalFilesDir(null)?.absolutePath + "/$downloadDirectory"
|
||||||
unzip(file.absolutePath, unzipDirectoryPath)
|
unzip(file.absolutePath, unzipDirectoryPath)
|
||||||
|
Toast.makeText(
|
||||||
|
requireContext(),
|
||||||
|
"NATS certificate Extracted",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
@@ -507,23 +391,44 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
||||||
|
when (it) {
|
||||||
|
is Result.Success -> {
|
||||||
|
it.data.data?.forEach { id ->
|
||||||
|
id.rawData?.let { it1 ->
|
||||||
|
hemoCubeViewModel.updateMolbioFlag(
|
||||||
|
it1._id
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is Result.Error -> {
|
||||||
|
binding.btnSubmit.visibility = View.VISIBLE
|
||||||
|
//Remove this line of code while deploying to IOCL
|
||||||
|
it.exception.let { message ->
|
||||||
|
Toast.makeText(activity, "An error occurred: $message", Toast.LENGTH_LONG)
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun isTokenExpired(token: String): Boolean {
|
private fun isTokenExpired(token: String): Boolean {
|
||||||
if(token.isNotEmpty()) {
|
val parts = token.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||||
val parts = token.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
|
val decodedPayload = String(Base64.decode(parts[1], Base64.DEFAULT))
|
||||||
val decodedPayload = String(Base64.decode(parts[1], Base64.DEFAULT))
|
val jsonPayload = JSONObject(decodedPayload)
|
||||||
val jsonPayload = JSONObject(decodedPayload)
|
|
||||||
|
|
||||||
val exp = jsonPayload.optLong("exp", 0)
|
val exp = jsonPayload.optLong("exp", 0)
|
||||||
val currentTimeSeconds = System.currentTimeMillis() / 1000
|
val currentTimeSeconds = System.currentTimeMillis() / 1000
|
||||||
|
|
||||||
return exp <= currentTimeSeconds
|
return exp <= currentTimeSeconds
|
||||||
}else{
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateTokens(response: Result.Success<LoginResponse>) {
|
private fun updateTokens(response: Result.Success<LoginResponse>) {
|
||||||
@@ -536,7 +441,6 @@ class HomeFragment : Fragment() {
|
|||||||
apply()
|
apply()
|
||||||
}
|
}
|
||||||
isTokenAvailable = true
|
isTokenAvailable = true
|
||||||
Log.d("istoken3",isTokenAvailable.toString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createLoginRequestData(userID: String, password: String): LoginRequest {
|
private fun createLoginRequestData(userID: String, password: String): LoginRequest {
|
||||||
@@ -647,7 +551,6 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.P)
|
|
||||||
private fun fetchDeviceCredentials() {
|
private fun fetchDeviceCredentials() {
|
||||||
try {
|
try {
|
||||||
val db = Firebase.firestore
|
val db = Firebase.firestore
|
||||||
@@ -674,16 +577,12 @@ class HomeFragment : Fragment() {
|
|||||||
)
|
)
|
||||||
// Save credentials in SharedPreferences
|
// Save credentials in SharedPreferences
|
||||||
with(sharedPreference.edit()) {
|
with(sharedPreference.edit()) {
|
||||||
putString(Constants.DEVICE_ID_API, username)
|
putString("username", username)
|
||||||
putString(Constants.DEVICE_PASSWORD_API, password)
|
putString("password", password)
|
||||||
putString(Constants.NATS_TOKEN, natsToken)
|
putString(Constants.NATS_TOKEN, natsToken)
|
||||||
apply()
|
apply()
|
||||||
}
|
}
|
||||||
if (!isTokenAvailable ) {
|
hemoCubeViewModel.login(createLoginRequestData(username, password))
|
||||||
Log.d("istoken0", isTokenAvailable.toString())
|
|
||||||
hemoCubeViewModel.login(createLoginRequestData(username, password))
|
|
||||||
}
|
|
||||||
|
|
||||||
} ?: Log.e("fetchDeviceCredentials", "Failed to parse device data.")
|
} ?: Log.e("fetchDeviceCredentials", "Failed to parse device data.")
|
||||||
} else {
|
} else {
|
||||||
Log.e("fetchDeviceCredentials", "Document does not exist.")
|
Log.e("fetchDeviceCredentials", "Document does not exist.")
|
||||||
@@ -872,28 +771,13 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun sanitizeDoubleValues(hemoCubeTestData: HemoCubeTestData): HemoCubeTestData {
|
|
||||||
hemoCubeTestData::class.java.declaredFields.forEach { field ->
|
|
||||||
if (field.type == Double::class.javaObjectType || field.type == Double::class.javaPrimitiveType) {
|
|
||||||
field.isAccessible = true
|
|
||||||
val value = field.get(hemoCubeTestData) as Double?
|
|
||||||
if (value != null && (value.isInfinite() || value.isNaN())) {
|
|
||||||
field.set(hemoCubeTestData, 0.0) // Replace with a suitable default value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return hemoCubeTestData
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private fun showUploadDialog(context: Context) {
|
private fun showUploadDialog(context: Context) {
|
||||||
val builder = AlertDialog.Builder(context)
|
val builder = AlertDialog.Builder(context)
|
||||||
builder.setTitle(R.string.upload_db_registration_title)
|
builder.setTitle(R.string.upload_db_registration_title)
|
||||||
builder.setMessage(R.string.upload_db_registration_message)
|
builder.setMessage(R.string.upload_db_registration_message)
|
||||||
|
|
||||||
builder.setPositiveButton(R.string.upload) { dialog, _ ->
|
builder.setPositiveButton(R.string.upload) { dialog, _ ->
|
||||||
// uploadLocalDBData(dialog)
|
uploadLocalDBData(dialog)
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.setNegativeButton(R.string.cancel) { dialog, _ ->
|
builder.setNegativeButton(R.string.cancel) { dialog, _ ->
|
||||||
@@ -939,34 +823,34 @@ class HomeFragment : Fragment() {
|
|||||||
|
|
||||||
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
||||||
val resultList = MolbioV2ResultRequest(mutableListOf(MolbioV2Result()))
|
val resultList = MolbioV2ResultRequest(mutableListOf(MolbioV2Result()))
|
||||||
// userDataList.forEach { userData ->
|
userDataList.forEach { userData ->
|
||||||
// if (!userData.molbioFlag && isTokenAvailable) {
|
if (!userData.molbioFlag && isTokenAvailable) {
|
||||||
// resultList.results?.add(
|
resultList.results?.add(
|
||||||
// MolbioV2Result(
|
MolbioV2Result(
|
||||||
// rawData = userData,
|
rawData = userData,
|
||||||
// analysisId = userData._id,
|
analysisId = userData._id,
|
||||||
// analysisDate = "2024-02-08 16:33:56", //userData.reportUploadTime,
|
analysisDate = "2024-02-08 16:33:56", //userData.reportUploadTime,
|
||||||
// analysisStatus = userData.classificationResult,
|
analysisStatus = userData.classificationResult,
|
||||||
// thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
||||||
// interpretation = userData.classificationResult,
|
interpretation = userData.classificationResult,
|
||||||
// testId = userData._id,
|
testId = userData._id,
|
||||||
// testTime = userData.testTime,
|
testTime = userData.testTime,
|
||||||
// collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
// expiryTime = "2024-02-08 16:33:56",//userData.testTime,
|
expiryTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
// )
|
)
|
||||||
// )
|
)
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!userData.localFlag) {
|
}
|
||||||
// userData.localFlag = true
|
|
||||||
// hemoCubeViewModel.bulkAddResultTestToDb(userData)
|
if (!userData.localFlag) {
|
||||||
// }
|
userData.localFlag = true
|
||||||
// if (!userData.molbioFlag && isTokenAvailable && Constants.MOLBIO_INTEGRATION) {
|
hemoCubeViewModel.bulkAddResultTestToDb(userData)
|
||||||
// userData.molbioFlag = true
|
}
|
||||||
// hemoCubeViewModel.uploadResult(resultList)
|
if (!userData.molbioFlag && isTokenAvailable && Constants.MOLBIO_INTEGRATION) {
|
||||||
// }
|
userData.molbioFlag = true
|
||||||
// }
|
hemoCubeViewModel.uploadResult(resultList)
|
||||||
|
}
|
||||||
|
}
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -979,6 +863,37 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
||||||
|
val resultList = MolbioV2ResultRequest(mutableListOf(MolbioV2Result()))
|
||||||
|
userDataList.forEach { userData ->
|
||||||
|
if (!userData.molbioFlag && isTokenAvailable) {
|
||||||
|
resultList.results?.add(
|
||||||
|
MolbioV2Result(
|
||||||
|
rawData = userData,
|
||||||
|
analysisId = userData._id,
|
||||||
|
analysisDate = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
|
analysisStatus = userData.classificationResult,
|
||||||
|
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
||||||
|
interpretation = userData.classificationResult,
|
||||||
|
testId = userData._id,
|
||||||
|
testTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
|
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
|
expiryTime = "2024-02-08 16:33:56"//userData.testTime,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
userData.molbioFlag = true
|
||||||
|
hemoCubeViewModel.uploadResult(resultList)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!userData.localFlag) {
|
||||||
|
userData.localFlag = true
|
||||||
|
hemoCubeViewModel.bulkAddResultTestToDb(userData)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private fun downloadLocalDBData(dialog: DialogInterface) {
|
// private fun downloadLocalDBData(dialog: DialogInterface) {
|
||||||
@@ -1099,7 +1014,6 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getDeviceId() {
|
private fun getDeviceId() {
|
||||||
Log.d("HomeFragmentUSb","getDeviceId")
|
|
||||||
val handler = activity as? DeviceCommunicationHandler
|
val handler = activity as? DeviceCommunicationHandler
|
||||||
handler?.sendAndListenToDevice(
|
handler?.sendAndListenToDevice(
|
||||||
HemoCubeCommands.DEVICE_CONFIGURATION_COMMAND,
|
HemoCubeCommands.DEVICE_CONFIGURATION_COMMAND,
|
||||||
@@ -1107,9 +1021,9 @@ class HomeFragment : Fragment() {
|
|||||||
override fun onUsbRead(data: ByteArray?) {
|
override fun onUsbRead(data: ByteArray?) {
|
||||||
data?.let {
|
data?.let {
|
||||||
val receivedData = String(it, Charset.forName("UTF-8"))
|
val receivedData = String(it, Charset.forName("UTF-8"))
|
||||||
Log.d("HomeFragment","USB data"+receivedData)
|
|
||||||
// Assuming the device ID is the full content of the received data. Adjust if needed.
|
// Assuming the device ID is the full content of the received data. Adjust if needed.
|
||||||
deviceId = extractDeviceId(receivedData) // Implement this method based on your data format.
|
deviceId =
|
||||||
|
extractDeviceId(receivedData) // Implement this method based on your data format.
|
||||||
if (deviceId.isNotEmpty()) {
|
if (deviceId.isNotEmpty()) {
|
||||||
// Store the deviceId in SharedPreferences
|
// Store the deviceId in SharedPreferences
|
||||||
with(sharedPreference.edit()) {
|
with(sharedPreference.edit()) {
|
||||||
@@ -1126,7 +1040,6 @@ class HomeFragment : Fragment() {
|
|||||||
|
|
||||||
override fun onUsbError(e: Exception?) {
|
override fun onUsbError(e: Exception?) {
|
||||||
// Handle USB communication error
|
// Handle USB communication error
|
||||||
Log.d("HomeFragment","USB read error"+e.toString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -1142,8 +1055,8 @@ class HomeFragment : Fragment() {
|
|||||||
private fun checkForUpdate() {
|
private fun checkForUpdate() {
|
||||||
try {
|
try {
|
||||||
val db = Firebase.firestore
|
val db = Firebase.firestore
|
||||||
//val deviceId = deviceId
|
|
||||||
|
|
||||||
|
val deviceId="HHH-AAA-ZZZ"
|
||||||
val deviceRef = db.collection("deviceUpdate").document(Constants.DOCUMENT_ID_FOR_UPDATE)
|
val deviceRef = db.collection("deviceUpdate").document(Constants.DOCUMENT_ID_FOR_UPDATE)
|
||||||
|
|
||||||
deviceRef.get().addOnSuccessListener { documentSnapshot ->
|
deviceRef.get().addOnSuccessListener { documentSnapshot ->
|
||||||
@@ -1245,7 +1158,7 @@ class HomeFragment : Fragment() {
|
|||||||
val filter = IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)
|
val filter = IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
isRegistered = true
|
isRegistered = true
|
||||||
requireActivity().registerReceiver(downloadReceiver, filter, RECEIVER_EXPORTED)
|
requireActivity().registerReceiver(downloadReceiver, filter, Context.RECEIVER_EXPORTED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private fun extractApkUrl(responseBody: ResponseBody): String {
|
private fun extractApkUrl(responseBody: ResponseBody): String {
|
||||||
@@ -1291,15 +1204,15 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
if(isRegistered) {
|
try {
|
||||||
try {
|
if (isRegistered){
|
||||||
requireActivity().unregisterReceiver(downloadReceiver)
|
requireActivity().unregisterReceiver(downloadReceiver)
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.d("HomeFragment", e.toString())
|
|
||||||
}
|
}
|
||||||
|
}catch (e: IllegalArgumentException){
|
||||||
|
Log.e("HOmeFragment",e.toString())
|
||||||
}
|
}
|
||||||
super.onDestroy()
|
|
||||||
|
|
||||||
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,10 +116,7 @@ class DeviceProvisionFragment : Fragment() {
|
|||||||
password = response.data.data?.credentials?.password.toString(),
|
password = response.data.data?.credentials?.password.toString(),
|
||||||
deviceProvisionResponse = response.data.data.toString(),
|
deviceProvisionResponse = response.data.data.toString(),
|
||||||
natsToken = response.data.data?.device?.deviceUser?.natsToken.toString(),
|
natsToken = response.data.data?.device?.deviceUser?.natsToken.toString(),
|
||||||
natsTokenExpiry = response.data.data?.device?.deviceUser?.natsTokenExpiry.toString(),
|
natsTokenExpiry = response.data.data?.device?.deviceUser?.natsTokenExpiry.toString()
|
||||||
globalUpdateIgnore = false,
|
|
||||||
globalUpdateDone = false,
|
|
||||||
deviceUpdateAvailable = false
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
// viewModel.addDeviceId(DeviceData(deviceId = sharedPreferences.getString(Constants.DEVICE_ID, "").toString()))
|
// viewModel.addDeviceId(DeviceData(deviceId = sharedPreferences.getString(Constants.DEVICE_ID, "").toString()))
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ class HemoCubeFragment : Fragment() {
|
|||||||
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
|
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
|
||||||
if (result == "Success") {
|
if (result == "Success") {
|
||||||
uploadedToCloud = true
|
uploadedToCloud = true
|
||||||
var accessToken = sharedPreferences.getString(Constants.ACCESS_TOKEN, "").toString()
|
|
||||||
showToast(R.string.test_upload)
|
showToast(R.string.test_upload)
|
||||||
if (Constants.MOLBIO_INTEGRATION) {
|
if (Constants.MOLBIO_INTEGRATION) {
|
||||||
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
||||||
@@ -162,8 +161,6 @@ class HemoCubeFragment : Fragment() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
handleReadingFinish()
|
handleReadingFinish()
|
||||||
hemoCubeViewModel.uploadLogs()
|
|
||||||
hemoCubeViewModel.downloadClientCertificate()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
|
|||||||
@@ -143,14 +143,6 @@ class HemoCubeViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun uploadResultfornew(molbioV2ResultRequest: MolbioV2ResultRequest) = viewModelScope.launch {
|
|
||||||
resultUpload.postValue(Result.Loading())
|
|
||||||
repository.uploadResults(molbioV2ResultRequest).let {
|
|
||||||
resultUpload.postValue(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun checkUpdate(checkUpdateRequest: CheckUpdateRequest) = viewModelScope.launch {
|
fun checkUpdate(checkUpdateRequest: CheckUpdateRequest) = viewModelScope.launch {
|
||||||
checkUpdate.postValue(Result.Loading())
|
checkUpdate.postValue(Result.Loading())
|
||||||
repository.checkUpdate(checkUpdateRequest).let {
|
repository.checkUpdate(checkUpdateRequest).let {
|
||||||
@@ -375,7 +367,7 @@ class HemoCubeViewModel @Inject constructor(
|
|||||||
userData.reportUploadTime = SimpleDateFormat(
|
userData.reportUploadTime = SimpleDateFormat(
|
||||||
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
||||||
).format(Calendar.getInstance().time)
|
).format(Calendar.getInstance().time)
|
||||||
when (repository.addTestToDatabasefornew(userData)) {
|
when (repository.addTestToDatabase(userData)) {
|
||||||
is Response.Success -> {
|
is Response.Success -> {
|
||||||
fireBaseBulkUpload.postValue("Success")
|
fireBaseBulkUpload.postValue("Success")
|
||||||
updateLocalFlag(userData._id)
|
updateLocalFlag(userData._id)
|
||||||
|
|||||||
@@ -11,14 +11,12 @@ import android.content.ServiceConnection
|
|||||||
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.os.Build
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.get
|
import androidx.core.view.get
|
||||||
@@ -45,7 +43,6 @@ open class HemocubeActivity : AppCompatActivity() {
|
|||||||
private val TAG = "HemoCube"
|
private val TAG = "HemoCube"
|
||||||
|
|
||||||
private val broadcastReceiver = object : BroadcastReceiver() {
|
private val broadcastReceiver = object : BroadcastReceiver() {
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
|
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
@@ -85,7 +82,6 @@ open class HemocubeActivity : AppCompatActivity() {
|
|||||||
super.attachBaseContext(newBase)
|
super.attachBaseContext(newBase)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityHemocubeBinding.inflate(layoutInflater)
|
binding = ActivityHemocubeBinding.inflate(layoutInflater)
|
||||||
@@ -110,7 +106,6 @@ open class HemocubeActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
open fun connectUsb(permissionGranted: Boolean) {
|
open fun connectUsb(permissionGranted: Boolean) {
|
||||||
Log.d(TAG, "connectUsb() called, permission variable = $permissionGranted")
|
Log.d(TAG, "connectUsb() called, permission variable = $permissionGranted")
|
||||||
val manager = getSystemService(Context.USB_SERVICE) as UsbManager
|
val manager = getSystemService(Context.USB_SERVICE) as UsbManager
|
||||||
@@ -130,7 +125,6 @@ open class HemocubeActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
@SuppressLint("MutableImplicitPendingIntent")
|
@SuppressLint("MutableImplicitPendingIntent")
|
||||||
private fun requestUserPermission(manager: UsbManager, device: UsbDevice) {
|
private fun requestUserPermission(manager: UsbManager, device: UsbDevice) {
|
||||||
val mPendingIntent: PendingIntent
|
val mPendingIntent: PendingIntent
|
||||||
@@ -148,21 +142,15 @@ open class HemocubeActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val filter = IntentFilter(Constants.HEMOCUBE_USB_PERMISSION)
|
val filter = IntentFilter(Constants.HEMOCUBE_USB_PERMISSION)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
registerReceiver(broadcastReceiver, filter)
|
||||||
registerReceiver(broadcastReceiver, filter, RECEIVER_EXPORTED)
|
|
||||||
}else{
|
|
||||||
registerReceiver(broadcastReceiver, filter)
|
|
||||||
}
|
|
||||||
manager.requestPermission(device, mPendingIntent)
|
manager.requestPermission(device, mPendingIntent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun setupService() {
|
fun setupService() {
|
||||||
val intent = Intent(this, UsbService::class.java)
|
val intent = Intent(this, UsbService::class.java)
|
||||||
bindService(intent, connection, Context.BIND_AUTO_CREATE)
|
bindService(intent, connection, Context.BIND_AUTO_CREATE)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
open fun reconnectDevice() {
|
open fun reconnectDevice() {
|
||||||
mService.disconnect()
|
mService.disconnect()
|
||||||
unbindService(connection)
|
unbindService(connection)
|
||||||
|
|||||||
9
app/src/main/res/drawable/baground_auto_dac.xml
Normal file
9
app/src/main/res/drawable/baground_auto_dac.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/card_blue_app" />
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<vector android:autoMirrored="true" android:height="24dp"
|
<vector android:autoMirrored="true" android:height="24dp"
|
||||||
android:tint="#EF0A0A" android:viewportHeight="24"
|
android:tint="#FF1010" android:viewportHeight="24"
|
||||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M17,7l-1.41,1.41L18.17,11H8v2h10.17l-2.58,2.58L17,17l5,-5zM4,5h8V3H4c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h8v-2H4V5z"/>
|
<path android:fillColor="@android:color/white" android:pathData="M17,7l-1.41,1.41L18.17,11H8v2h10.17l-2.58,2.58L17,17l5,-5zM4,5h8V3H4c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h8v-2H4V5z"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/baseline_qr_code_scanner_24_x.png
Normal file
BIN
app/src/main/res/drawable/baseline_qr_code_scanner_24_x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 725 B |
6
app/src/main/res/drawable/bloodgroup_button.xml
Normal file
6
app/src/main/res/drawable/bloodgroup_button.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="15dp" />
|
||||||
|
<solid android:color="#D7FF0000" />
|
||||||
|
</shape>
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
tools:ignore="ExtraText">
|
tools:ignore="ExtraText">
|
||||||
<solid android:color="@android:color/transparent" />
|
<solid android:color="@android:color/transparent" />
|
||||||
|
<corners android:radius="10dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:color="#000000"
|
android:color="#000000"
|
||||||
android:width="2dp" />
|
android:width="1dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
12
app/src/main/res/drawable/button_new.xml
Normal file
12
app/src/main/res/drawable/button_new.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="?attr/colorControlHighlight">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
<stroke android:color="@color/red" android:width="1dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
18
app/src/main/res/drawable/pannel_button.xml
Normal file
18
app/src/main/res/drawable/pannel_button.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- Drop Shadow -->
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#4D000000" /> <!-- Semi-transparent black color -->
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<!-- Original Shape with Blue Color -->
|
||||||
|
<item android:top="5dp" android:right="5dp" android:left="5dp" android:bottom="5dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/card_blue_app" />
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
6
app/src/main/res/drawable/rounded_corner_background.xml
Normal file
6
app/src/main/res/drawable/rounded_corner_background.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/new_blue" />
|
||||||
|
<corners android:radius="10dp" /> <!-- Adjust the radius as needed -->
|
||||||
|
</shape>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:titleTextColor="#FFFFFF"
|
app:titleTextColor="@color/blue_text_color"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
app:menu="@menu/my_menu"
|
app:menu="@menu/my_menu"
|
||||||
android:theme="@style/ToolbarTheme"
|
android:theme="@style/ToolbarTheme"
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
app:headerLayout="@layout/nav_header_dashboard"
|
app:headerLayout="@layout/nav_header_dashboard"
|
||||||
app:menu="@menu/activity_main_drawer" />
|
app:menu="@menu/activity_main_drawer"
|
||||||
|
app:itemIconTint="@color/blue_text_color" />
|
||||||
|
|
||||||
</androidx.drawerlayout.widget.DrawerLayout>
|
</androidx.drawerlayout.widget.DrawerLayout>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:titleTextColor="#FFFFFF"
|
app:titleTextColor="@color/blue_text_color"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
app:menu="@menu/my_menu"
|
app:menu="@menu/my_menu"
|
||||||
android:theme="@style/ToolbarTheme"
|
android:theme="@style/ToolbarTheme"
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/scan_qr_code_of_the_kit"
|
android:text="@string/scan_qr_code_of_the_kit"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/app_bar_layout" />
|
app:layout_constraintTop_toBottomOf="@id/app_bar_layout" />
|
||||||
|
|
||||||
@@ -40,11 +41,12 @@
|
|||||||
android:layout_width="258dp"
|
android:layout_width="258dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:drawableLeft="@drawable/baseline_qr_code_scanner_24"
|
android:drawableLeft="@drawable/baseline_qr_code_scanner_24_x"
|
||||||
android:text="@string/scan_now"
|
android:text="@string/scan_now"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
app:backgroundTint="@color/blue_app_light"
|
app:backgroundTint="@color/blue_app_light"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_toLeftOf="@id/tvText1"
|
android:layout_toLeftOf="@id/tvText1"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -83,7 +85,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_toRightOf="@id/tvText1"
|
android:layout_toRightOf="@id/tvText1"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -96,6 +98,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="48dp"
|
android:layout_marginTop="48dp"
|
||||||
android:text="@string/enter_kit_serial_number_manually"
|
android:text="@string/enter_kit_serial_number_manually"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
||||||
|
|
||||||
@@ -121,13 +124,15 @@
|
|||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_go"
|
android:id="@+id/btn_go"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:text="@string/go"
|
android:text="@string/go"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:titleTextColor="#FFFFFF"
|
app:titleTextColor="@color/blue_text_color"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
app:menu="@menu/my_menu"
|
app:menu="@menu/my_menu"
|
||||||
android:theme="@style/ToolbarTheme"
|
android:theme="@style/ToolbarTheme"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:titleTextColor="#FFFFFF"
|
app:titleTextColor="@color/blue_text_color"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
app:menu="@menu/my_menu"
|
app:menu="@menu/my_menu"
|
||||||
android:theme="@style/ToolbarTheme"
|
android:theme="@style/ToolbarTheme"
|
||||||
|
|||||||
@@ -14,8 +14,9 @@
|
|||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
app:titleTextColor="@color/blue_text_color"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="@color/new_blue"
|
||||||
app:popupTheme="@style/Theme.HPOS.PopupOverlay" />
|
app:popupTheme="@style/Theme.HPOS.PopupOverlay" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/spinner_concentration" />
|
app:layout_constraintTop_toBottomOf="@id/spinner_concentration" />
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -80,8 +80,9 @@
|
|||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Continue"
|
android:text="Continue"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
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/et_readings_per_sample" />
|
app:layout_constraintTop_toBottomOf="@id/et_readings_per_sample" />
|
||||||
|
|||||||
@@ -47,41 +47,48 @@
|
|||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="380dp"
|
android:layout_height="380dp"
|
||||||
|
android:background="@drawable/baground_auto_dac"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="11sp"
|
android:textSize="16sp"
|
||||||
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/tv_subtitle3" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle3" />
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Start Auto DAC"
|
android:text="Start Auto DAC"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
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/tv_subtitle4" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle4" />
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_read_dac"
|
android:id="@+id/btn_read_dac"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Read Current DAC Values"
|
android:text="Read Current DAC Values"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
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_submit" />
|
app:layout_constraintTop_toBottomOf="@id/btn_submit" />
|
||||||
|
|||||||
@@ -50,38 +50,45 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/baground_auto_dac"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="11sp"
|
android:textSize="16sp"
|
||||||
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/tv_subtitle3" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle3" />
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
android:text="Start Auto DAC"
|
android:text="Start Auto DAC"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
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/tv_subtitle4" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle4" />
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_read_dac"
|
android:id="@+id/btn_read_dac"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
android:text="Read Current DAC Values"
|
android:text="Read Current DAC Values"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
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_submit" />
|
app:layout_constraintTop_toBottomOf="@id/btn_submit" />
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:background="@drawable/border"
|
android:background="@drawable/border"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -70,8 +72,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="36dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
android:background="@drawable/border"
|
android:background="@drawable/border"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -104,8 +108,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="36dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
android:background="@drawable/border"
|
android:background="@drawable/border"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -138,8 +144,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="36dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
android:background="@drawable/border"
|
android:background="@drawable/border"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -174,7 +182,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
|
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="36dp"
|
||||||
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/llLed4Fields" />
|
app:layout_constraintTop_toBottomOf="@id/llLed4Fields" />
|
||||||
@@ -185,26 +193,30 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="60dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
|
android:background="@drawable/baground_auto_dac"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
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/tv_subtitle3" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle3" />
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="60dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Save"
|
android:text="Save"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
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/tv_subtitle4" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle4" />
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="50dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/baground_auto_dac"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
|
android:background="@drawable/baground_auto_dac"
|
||||||
android:textColor="@color/red"
|
android:textColor="@color/red"
|
||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/tv_subtitle3" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle3" />
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -66,8 +67,9 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
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/tv_subtitle4" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle4" />
|
||||||
|
|||||||
@@ -26,121 +26,130 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<GridLayout
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_submit"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="@string/check_buffer"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_subtitle4" />
|
|
||||||
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_diagnostics"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="@string/diagnostics"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_submit" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_auto_dac"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="@string/auto_dac"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_diagnostics" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_calibration"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="@string/calibration"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_auto_dac" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_deviceInfo"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="@string/deviceinfo"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_calibration" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
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="visible"
|
android:columnCount="2"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:rowCount="4"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_margin="5dp"
|
||||||
android:clickable="false"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:text="@string/deviceProvision"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
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/tv_subtitle4"
|
||||||
|
>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_firefox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:text="@string/Firefox"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_deviceProvision" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_files"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="160dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="120dp"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:textSize="14dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_margin="8sp"
|
||||||
android:clickable="false"
|
android:layout_gravity="center"
|
||||||
android:text="@string/Files"
|
android:clickable="false"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/pannel_button"
|
||||||
app:cornerRadius="16dp"
|
android:text="@string/check_buffer"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:textColor="@color/blue_text_color" />
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_firefox" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_diagnostics"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="diagnostics"
|
||||||
|
android:clickable="false"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_auto_dac"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:clickable="false"
|
||||||
|
android:text="@string/auto_dac"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color"
|
||||||
|
app:cornerRadius="16dp" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_calibration"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:clickable="false"
|
||||||
|
android:text="@string/calibration"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color"
|
||||||
|
app:cornerRadius="16dp" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_deviceInfo"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:clickable="false"
|
||||||
|
android:text="@string/deviceinfo"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color"
|
||||||
|
app:cornerRadius="16dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_deviceProvision"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="@string/deviceProvision"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:cornerRadius="16dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_firefox"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:clickable="false"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="@string/Firefox"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color"
|
||||||
|
app:cornerRadius="16dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_files"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_margin="8sp"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:clickable="false"
|
||||||
|
android:text="@string/Files"
|
||||||
|
android:background="@drawable/pannel_button"
|
||||||
|
android:textColor="@color/blue_text_color"
|
||||||
|
app:cornerRadius="16dp"
|
||||||
|
tools:layout_editor_absoluteX="208dp"
|
||||||
|
tools:layout_editor_absoluteY="240dp" />
|
||||||
|
|
||||||
|
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<!-- app:layout_constraintTop_toBottomOf="@id/btn_submit" />-->
|
<!-- app:layout_constraintTop_toBottomOf="@id/btn_submit" />-->
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -106,7 +106,8 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:text="@string/submit"
|
android:text="@string/submit"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
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/tv_subtitle4" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle4" />
|
||||||
|
|||||||
@@ -108,8 +108,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="48dp"
|
|
||||||
android:text="@string/enter_kit_serial_number_manually"
|
android:text="@string/enter_kit_serial_number_manually"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
@@ -135,13 +135,15 @@
|
|||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_go"
|
android:id="@+id/btn_go"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:text="@string/go"
|
android:text="@string/go"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
@@ -164,7 +166,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_placebuffer"
|
android:id="@+id/btn_placebuffer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -172,7 +174,8 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:text="@string/place_buffer"
|
android:text="@string/place_buffer"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
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"
|
||||||
|
|||||||
@@ -131,8 +131,10 @@
|
|||||||
android:id="@+id/internetAvailableCL"
|
android:id="@+id/internetAvailableCL"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:padding="24dp"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
android:padding="24dp">
|
tools:layout_editor_absoluteX="162dp"
|
||||||
|
tools:layout_editor_absoluteY="-82dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
@@ -153,6 +155,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btnLogout"
|
android:id="@+id/btnLogout"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
@@ -211,8 +214,9 @@
|
|||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/radioGroup"
|
android:id="@+id/radioGroup"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:orientation="horizontal"
|
||||||
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/cardView4">
|
app:layout_constraintTop_toBottomOf="@+id/cardView4">
|
||||||
@@ -249,52 +253,58 @@
|
|||||||
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/radioGroup"
|
app:layout_constraintTop_toBottomOf="@+id/radioGroup"
|
||||||
tools:listitem="@layout/user_item_view"/>
|
tools:listitem="@layout/user_item_view" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/labelQuickCapture"
|
android:id="@+id/labelQuickCapture"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Quick Capture"
|
android:text="Quick Capture"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/btnQuickCapture"
|
app:layout_constraintBottom_toTopOf="@+id/btnQuickCapture"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/btnQuickCapture"
|
android:id="@+id/btnQuickCapture"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:backgroundTint="@color/primary"
|
android:backgroundTint="@color/primary"
|
||||||
android:contentDescription="Capture measurements quickly"
|
android:text="Quick Capture"
|
||||||
android:src="@drawable/flask"
|
android:visibility="visible"
|
||||||
app:elevation="1dp"
|
app:elevation="1dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/label"
|
app:icon="@drawable/flask"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/label"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/label"
|
android:id="@+id/label"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="2dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="6dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:background="@drawable/rounded_corner_background"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
android:text="@string/new_kit"
|
android:text="@string/new_kit"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/btnNewKit"
|
app:layout_constraintBottom_toTopOf="@+id/btnNewKit"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/btnNewKit"
|
android:id="@+id/btnNewKit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:backgroundTint="@color/primary"
|
android:backgroundTint="@color/primary"
|
||||||
android:contentDescription="@string/new_kit"
|
|
||||||
android:src="@drawable/ic_add"
|
android:src="@drawable/ic_add"
|
||||||
|
android:text="@string/new_kit"
|
||||||
app:elevation="1dp"
|
app:elevation="1dp"
|
||||||
|
app:icon="@drawable/ic_add"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="Scan to get the code"
|
android:text="Scan to get the code"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_subtitle2" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle2" />
|
||||||
|
|
||||||
@@ -58,11 +59,12 @@
|
|||||||
android:layout_width="258dp"
|
android:layout_width="258dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:drawableLeft="@drawable/baseline_qr_code_scanner_24"
|
android:drawableLeft="@drawable/baseline_qr_code_scanner_24_x"
|
||||||
android:text="@string/scan_now"
|
android:text="@string/scan_now"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
app:backgroundTint="@color/blue_app_light"
|
app:backgroundTint="@color/blue_app_light"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||||
|
|
||||||
@@ -90,9 +92,9 @@
|
|||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Refresh"
|
android:text="Refresh"
|
||||||
android:visibility="visible"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
app:layout_constraintEnd_toEndOf="@id/btn_scan_now"
|
android:visibility="visible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_scan_now" />
|
app:layout_constraintTop_toBottomOf="@id/btn_scan_now" />
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,10 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="10dp"
|
||||||
|
app:boxCornerRadiusBottomStart="10dp"
|
||||||
|
app:boxCornerRadiusTopEnd="10dp"
|
||||||
|
app:boxCornerRadiusTopStart="10dp"
|
||||||
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/imageView">
|
app:layout_constraintTop_toBottomOf="@+id/imageView">
|
||||||
@@ -70,6 +74,10 @@
|
|||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
app:boxCornerRadiusBottomEnd="10dp"
|
||||||
|
app:boxCornerRadiusBottomStart="10dp"
|
||||||
|
app:boxCornerRadiusTopEnd="10dp"
|
||||||
|
app:boxCornerRadiusTopStart="10dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -84,12 +92,14 @@
|
|||||||
android:maxLength="12" />
|
android:maxLength="12" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btnLogin"
|
android:id="@+id/btnLogin"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="150dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/login"
|
android:text="@string/login"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
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"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/scan_patient_abha_id_card"
|
android:text="@string/scan_patient_abha_id_card"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
@@ -25,11 +26,12 @@
|
|||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:drawableLeft="@drawable/baseline_qr_code_scanner_24"
|
android:drawableLeft="@drawable/baseline_qr_code_scanner_24_x"
|
||||||
android:text="@string/scan_now"
|
android:text="@string/scan_now"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
app:backgroundTint="@color/blue_app_light"
|
app:backgroundTint="@color/blue_app_light"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||||
|
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_toLeftOf="@id/tvText1"
|
android:layout_toLeftOf="@id/tvText1"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_toRightOf="@id/tvText1"
|
android:layout_toRightOf="@id/tvText1"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -81,6 +83,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="48dp"
|
android:layout_marginTop="48dp"
|
||||||
android:text="@string/enter_abha_number_manualy"
|
android:text="@string/enter_abha_number_manualy"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
||||||
|
|
||||||
@@ -105,13 +108,15 @@
|
|||||||
android:inputType="number" />
|
android:inputType="number" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_go"
|
android:id="@+id/btn_go"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:text="@string/go"
|
android:text="@string/go"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
@@ -144,7 +149,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_toLeftOf="@id/tvText2"
|
android:layout_toLeftOf="@id/tvText2"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -152,7 +157,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_toRightOf="@id/tvText2"
|
android:layout_toRightOf="@id/tvText2"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -164,6 +169,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="48dp"
|
android:layout_marginTop="48dp"
|
||||||
android:text="Create ABHA ID card"
|
android:text="Create ABHA ID card"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/seperator2" />
|
app:layout_constraintTop_toBottomOf="@id/seperator2" />
|
||||||
|
|
||||||
@@ -177,6 +183,7 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
app:backgroundTint="@color/blue_app_light"
|
app:backgroundTint="@color/blue_app_light"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title3" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_title3" />
|
||||||
|
|
||||||
|
|||||||
@@ -137,15 +137,6 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/til_careof">
|
app:layout_constraintTop_toBottomOf="@id/til_careof">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/et_is_married"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/is_patient_married_yes_no"
|
|
||||||
android:inputType="none"
|
|
||||||
android:labelFor="@id/til_is_married"
|
|
||||||
app:simpleItems="@array/yes_no" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
@@ -168,6 +159,15 @@
|
|||||||
android:labelFor="@id/til_category"
|
android:labelFor="@id/til_category"
|
||||||
app:simpleItems="@array/category" />
|
app:simpleItems="@array/category" />
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/et_is_married"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/is_patient_married_yes_no"
|
||||||
|
android:inputType="none"
|
||||||
|
android:labelFor="@id/til_is_married"
|
||||||
|
app:simpleItems="@array/yes_no" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/scan_patient_aadhaar_card"
|
android:text="@string/scan_patient_aadhaar_card"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
@@ -24,11 +25,12 @@
|
|||||||
android:layout_width="258dp"
|
android:layout_width="258dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:drawableLeft="@drawable/baseline_qr_code_scanner_24"
|
android:drawableLeft="@drawable/baseline_qr_code_scanner_24_x"
|
||||||
android:text="@string/scan_now"
|
android:text="@string/scan_now"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
app:backgroundTint="@color/blue_app_light"
|
app:backgroundTint="@color/blue_app_light"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||||
|
|
||||||
@@ -59,7 +61,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_toLeftOf="@id/tvText1"
|
android:layout_toLeftOf="@id/tvText1"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -67,7 +69,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_toRightOf="@id/tvText1"
|
android:layout_toRightOf="@id/tvText1"
|
||||||
android:background="@color/gray" />
|
android:background="@color/red" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -80,6 +82,7 @@
|
|||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="48dp"
|
android:layout_marginTop="48dp"
|
||||||
android:text="@string/enter_aadhaar_number_manualy"
|
android:text="@string/enter_aadhaar_number_manualy"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
||||||
|
|
||||||
@@ -105,15 +108,17 @@
|
|||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_go"
|
android:id="@+id/btn_go"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:text="@string/go"
|
android:text="@string/go"
|
||||||
|
android:textColor="@color/red"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintStart_toEndOf="@id/et_abha_id"
|
app:layout_constraintStart_toEndOf="@id/et_abha_id"
|
||||||
app:layout_constraintTop_toTopOf="@id/et_abha_id" />
|
app:layout_constraintTop_toTopOf="@id/et_abha_id" />
|
||||||
|
|||||||
@@ -45,14 +45,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_subtitle1" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle1" />
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_set_reference"
|
android:id="@+id/btn_set_reference"
|
||||||
android:layout_width="192dp"
|
android:layout_width="192dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:text="@string/set_reference"
|
android:text="@string/set_reference"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
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/tv_subtitle2" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle2" />
|
||||||
|
|||||||
@@ -222,7 +222,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_subtitle2" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle2" />
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_submit"
|
android:id="@+id/btn_submit"
|
||||||
android:layout_width="216dp"
|
android:layout_width="216dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -230,7 +230,8 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:text="@string/submit"
|
android:text="@string/submit"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
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/tv_subtitle3" />
|
app:layout_constraintTop_toBottomOf="@id/tv_subtitle3" />
|
||||||
|
|||||||
@@ -108,8 +108,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="48dp"
|
|
||||||
android:text="@string/enter_kit_serial_number_manually"
|
android:text="@string/enter_kit_serial_number_manually"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
@@ -129,34 +129,42 @@
|
|||||||
android:id="@+id/name_edit_text"
|
android:id="@+id/name_edit_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
app:boxCornerRadiusBottomEnd="10dp"
|
||||||
|
app:boxCornerRadiusBottomStart="10dp"
|
||||||
|
app:boxCornerRadiusTopEnd="10dp"
|
||||||
|
app:boxCornerRadiusTopStart="10dp"
|
||||||
android:maxLength="17"
|
android:maxLength="17"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:hint="@string/serial_number" />
|
android:hint="@string/serial_number" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_go"
|
android:id="@+id/btn_go"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
android:text="@string/go"
|
android:text="@string/go"
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
app:layout_constraintBottom_toBottomOf="@id/et_abha_id"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintStart_toEndOf="@id/et_abha_id"
|
app:layout_constraintStart_toEndOf="@id/et_abha_id"
|
||||||
app:layout_constraintTop_toTopOf="@id/et_abha_id" />
|
app:layout_constraintTop_toTopOf="@id/et_abha_id" />
|
||||||
<Button
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/btn_samplestart"
|
android:id="@+id/btn_samplestart"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
android:background="@drawable/button_new"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:text="@string/Start_Sample"
|
android:text="@string/Start_Sample"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/red"
|
||||||
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"
|
||||||
@@ -164,7 +172,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_placebuffer"
|
android:id="@+id/btn_placebuffer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -172,7 +180,8 @@
|
|||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:text="@string/place_buffer"
|
android:text="@string/place_buffer"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/button_new"
|
||||||
|
android:textColor="@color/red"
|
||||||
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"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/nav_header_height"
|
android:layout_height="@dimen/nav_header_height"
|
||||||
android:background="@color/blue_app"
|
android:background="@color/new_blue"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
@@ -18,25 +18,29 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:cardCornerRadius="16dp">
|
app:cardCornerRadius="16dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/nav_header_desc"
|
android:contentDescription="@string/nav_header_desc"
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
android:padding="6dp"
|
||||||
app:srcCompat="@mipmap/hpos_icon" />
|
app:srcCompat="@mipmap/hpos_icon" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8sp"
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||||
android:text="@string/nav_header_title"
|
android:text="@string/nav_header_title"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
|
android:textColor="@color/blue_text_color" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/nav_header_subtitle" />
|
android:layout_marginLeft="8sp"
|
||||||
|
android:text="@string/nav_header_subtitle"
|
||||||
|
android:textColor="@color/blue_text_color" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
android:id="@+id/userImage"
|
android:id="@+id/userImage"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_launcher_foreground" />
|
tools:src="@drawable/ic_launcher_foreground" />
|
||||||
@@ -82,15 +83,21 @@
|
|||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
app:layout_constraintStart_toEndOf="@+id/btn_blood"
|
app:layout_constraintStart_toEndOf="@+id/btn_blood"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/btn_blood" />
|
app:layout_constraintBottom_toBottomOf="@+id/btn_blood" />
|
||||||
<Button
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btn_blood"
|
android:id="@+id/btn_blood"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginEnd="60dp"
|
||||||
|
android:background="@drawable/bloodgroup_button"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
android:text="@string/blood_group"
|
android:text="@string/blood_group"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/btn_startIncubation"
|
app:layout_constraintEnd_toStartOf="@+id/btn_startIncubation"
|
||||||
app:layout_constraintTop_toBottomOf="@id/teststatus" />
|
app:layout_constraintTop_toBottomOf="@id/userImage" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -271,4 +271,6 @@
|
|||||||
<string name="deviceinfo">डिवाइस जानकारी</string>
|
<string name="deviceinfo">डिवाइस जानकारी</string>
|
||||||
|
|
||||||
<string name="downloadcsv">सीएसवी डाउनलोड करें</string>
|
<string name="downloadcsv">सीएसवी डाउनलोड करें</string>
|
||||||
|
<string name="Firefox">Firefox</string>
|
||||||
|
<string name="Files">Files</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -271,5 +271,7 @@
|
|||||||
<string name="ok">ಸರಿ</string>
|
<string name="ok">ಸರಿ</string>
|
||||||
<string name="downloadcsv">CSV ಡೌನ್ಲೋಡ್ ಮಾಡಿ</string>
|
<string name="downloadcsv">CSV ಡೌನ್ಲೋಡ್ ಮಾಡಿ</string>
|
||||||
<!-- Add translations for other strings -->
|
<!-- Add translations for other strings -->
|
||||||
|
<string name="Firefox">Firefox</string>
|
||||||
|
<string name="Files">Files</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -8,20 +8,27 @@
|
|||||||
<color name="black">#FF000000</color>
|
<color name="black">#FF000000</color>
|
||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
<color name="gray">#808080</color>
|
<color name="gray">#808080</color>
|
||||||
|
<color name="blue_text_color">#0E2347</color>
|
||||||
|
|
||||||
|
|
||||||
<color name="brightGreen">#00FF00</color>
|
<color name="brightGreen">#00FF00</color>
|
||||||
<color name="green_2">#295F2D</color>
|
<color name="green_2">#295F2D</color>
|
||||||
<color name="red">#FF0000</color>
|
<color name="red">#FF0000</color>
|
||||||
|
<color name="red_light">#88FF0000</color>
|
||||||
<color name="blue_app">#4daaff</color>
|
<color name="blue_app">#4daaff</color>
|
||||||
|
<color name="card_blue_app">#43BFE8F7</color>
|
||||||
<color name="blue_app_dark">#005db3</color>
|
<color name="blue_app_dark">#005db3</color>
|
||||||
<color name="blue_app_light">#e5f3ff</color>
|
<color name="blue_app_light">#e5f3ff</color>
|
||||||
|
<color name="new_blue">#A2C3FA</color>
|
||||||
|
|
||||||
|
|
||||||
<color name="primary">#4daaff</color>
|
<color name="primary">#A2C3FA</color>
|
||||||
<color name="primary_dark">#005db3</color>
|
<color name="primary_dark">#005db3</color>
|
||||||
<color name="primary_light">#e5f3ff</color>
|
<color name="primary_light">#e5f3ff</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<string name="create_abha_id_card">Create ABHA ID Card</string>
|
<string name="create_abha_id_card">Create ABHA ID Card</string>
|
||||||
<string name="official_abha_app">Official ABHA App</string>
|
<string name="official_abha_app">Official ABHA App</string>
|
||||||
<string name="scan_patient_aadhaar_card">Scan Patient Aadhaar Card</string>
|
<string name="scan_patient_aadhaar_card">Scan Patient Aadhaar Card</string>
|
||||||
<string name="enter_aadhaar_number_manualy">Enter Aadhaar number manualy</string>
|
<string name="enter_aadhaar_number_manualy">Enter Aadhaar Number Manually</string>
|
||||||
<string name="aadhaar_number">Aadhaar Number</string>
|
<string name="aadhaar_number">Aadhaar Number</string>
|
||||||
<string name="aadhaar_in_tv"><b>Aadhaar Number</b></string>
|
<string name="aadhaar_in_tv"><b>Aadhaar Number</b></string>
|
||||||
<string name="please_use_official_abha_app_to_create_abha_id_and_come_back">Please use “Official ABHA App" to create ABHA ID, and come back.</string>
|
<string name="please_use_official_abha_app_to_create_abha_id_and_come_back">Please use “Official ABHA App" to create ABHA ID, and come back.</string>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<external-files-path name="downloaded_file" path="." />
|
<external-files-path name="Updates" path="." />
|
||||||
</paths>
|
</paths>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ buildscript {
|
|||||||
kotlin_version = '1.8.21'
|
kotlin_version = '1.8.21'
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.3.0'
|
classpath 'com.android.tools.build:gradle:8.2.2'
|
||||||
classpath 'com.google.gms:google-services:4.4.0'
|
classpath 'com.google.gms:google-services:4.4.0'
|
||||||
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.1'
|
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.1'
|
||||||
}
|
}
|
||||||
|
|||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Tue Feb 27 16:09:58 IST 2024
|
#Mon Jun 12 17:07:47 IST 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user