From ae42c96256c9dbd895243681e307da7b00b093f9 Mon Sep 17 00:00:00 2001 From: Mariya Date: Wed, 3 Jan 2024 15:31:58 +0530 Subject: [PATCH] Toast Message is Added, if the device is connected --- .../java/com/example/hpostesting/presentation/MainActivity.kt | 1 + .../hpostesting/presentation/dashboard/DashboardActivity.kt | 2 -- app/src/main/res/values/strings.xml | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/hpostesting/presentation/MainActivity.kt b/app/src/main/java/com/example/hpostesting/presentation/MainActivity.kt index 91763ae..d5d1b9f 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/MainActivity.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/MainActivity.kt @@ -104,6 +104,7 @@ class MainActivity : AppCompatActivity() { val deviceType = when { availableDrivers.isNotEmpty() -> { val device = availableDrivers[0].device + Toast.makeText(this, R.string.device, Toast.LENGTH_SHORT).show() when { device.productId == Constants.HOMO_CUBE_ID && device.vendorId == Constants.VENDOR_ID -> { binding.cvItem1.visibility = View.VISIBLE diff --git a/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt b/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt index 584138a..9bf5207 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt @@ -27,8 +27,6 @@ class DashboardActivity : AppCompatActivity() { private lateinit var appBarConfiguration: AppBarConfiguration private lateinit var binding: ActivityDashboardBinding - val appUpdateManager: AppUpdateManager = AppUpdateManagerFactory.create(applicationContext) - val appUpdateInfoTask = appUpdateManager.appUpdateInfo override fun attachBaseContext(newBase: Context?) { val languageCode = LanguageManager.getSavedLanguage(newBase!!) LanguageManager.setLocale(newBase, languageCode) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 47fd564..80d0e69 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -232,6 +232,7 @@ You must grant permission to access all files to use the app All permissions are required to use the app. Device Not Connected. + Device is Connected. Please enter a proper Login ID Please enter a proper password Wrong Password