Compare commits
2 Commits
seperate_t
...
preprod-te
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da9a2296d6 | ||
|
|
30fde87f95 |
@@ -8,5 +8,6 @@ data class LoginRequest(
|
||||
val mode: String? = "",
|
||||
val password: String? = "",
|
||||
val serialNumber: String? = "",
|
||||
val username: String? = ""
|
||||
val username: String? = "",
|
||||
val version: String? = "2.1.26"
|
||||
)
|
||||
@@ -58,11 +58,10 @@ class DashboardActivity : AppCompatActivity() {
|
||||
hemocubeViewModel.deviceUpdate.observe(this) { result ->
|
||||
when (result) {
|
||||
is Result.Success -> {
|
||||
// Handle success
|
||||
val apkUrl = result.data
|
||||
// val apkUrl = "https://dl.dropboxusercontent.com/s/fi/1c3nn7t0co431hicl3hrt/app-debug.apk?rlkey=e4uf13ty1dpcked614vy1aaqp&dl=0"
|
||||
// val apkUrl = result.data
|
||||
val apkUrl = "https://dl.dropboxusercontent.com/s/fi/1c3nn7t0co431hicl3hrt/app-debug.apk?rlkey=e4uf13ty1dpcked614vy1aaqp&dl=0"
|
||||
initiateUpdate(apkUrl.toString())
|
||||
Log.d("ApI", "APK URL: $apkUrl")
|
||||
Log.d("ApI", "APK URL For App Update: $apkUrl")
|
||||
Toast.makeText(
|
||||
this,
|
||||
"APK UPLOAD ${result.data}",
|
||||
|
||||
@@ -52,6 +52,7 @@ class HomeFragment : Fragment() {
|
||||
private val viewModel: TestRightViewModel by activityViewModels()
|
||||
private val hemoCubeViewModel: HemoCubeViewModel by activityViewModels()
|
||||
private lateinit var rvAdapter: UserListAdapter
|
||||
private lateinit var sharedPreferences: SharedPreferences
|
||||
private var batLevel: Int =
|
||||
0 // Initialize with a default value, or obtain the actual battery level
|
||||
private lateinit var adapter: OfflineUserListAdapter
|
||||
@@ -240,6 +241,8 @@ class HomeFragment : Fragment() {
|
||||
with(sharedPreference.edit()) {
|
||||
putString(Constants.ACCESS_TOKEN, response.data.data?.accessToken)
|
||||
putString(Constants.NATS_TOKEN, response.data.data?.deviceUser?.natsToken)
|
||||
putString(Constants.DEVICE_ID, response.data.data?.deviceUser?.deviceId?.toString())
|
||||
|
||||
apply()
|
||||
}
|
||||
}
|
||||
@@ -264,7 +267,7 @@ class HomeFragment : Fragment() {
|
||||
|
||||
private fun createDeviceRequestData(): DeviceUpdateRequest {
|
||||
return DeviceUpdateRequest(
|
||||
serial_no = Constants.serialNumber
|
||||
serial_no = Constants.DEVICE_ID
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.example.hpostesting.data.model.updates.DeviceUpdateRequest
|
||||
import com.example.hpostesting.data.repository.DatabaseRepository
|
||||
import com.example.hpostesting.data.repository.Repository
|
||||
import com.example.hpostesting.domain.LogFileManager
|
||||
import com.example.hpostesting.presentation.hemocube.HemoCubeFragmentDirections.Companion
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||
|
||||
Reference in New Issue
Block a user