react-native-mytatva-rn-sdk 1.2.33 → 1.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/mytatvarnsdk/CgmTrackyLibModule.kt +3 -30
- package/android/src/main/java/com/mytatvarnsdk/activity/ConnectSensorActivity.kt +9 -2
- package/android/src/main/java/com/mytatvarnsdk/activity/SearchTransmitterActivity.kt +7 -3
- package/android/src/main/java/com/mytatvarnsdk/activity/SensorConnectSuccessActivity.kt +113 -102
- package/android/src/main/java/com/mytatvarnsdk/activity/StartCGMActivity.kt +50 -2
- package/android/src/main/res/color/radio_text_selector.xml +1 -1
- package/android/src/main/res/drawable/img_sensor_cross.png +0 -0
- package/android/src/main/res/layout/activity_connect_sensor.xml +4 -4
- package/android/src/main/res/layout/activity_help.xml +0 -3
- package/android/src/main/res/layout/activity_search_transmitter.xml +4 -4
- package/android/src/main/res/layout/activity_sensor_connect_success.xml +250 -179
- package/android/src/main/res/values/styles.xml +103 -102
- package/ios/MyReactNativeBridge.m +113 -13
- package/ios/Storyboard/MainCGM.storyboard +44 -44
- package/ios/Support/Global.swift +11 -0
- package/ios/Support/GlobalYouTubePlayerView.swift +33 -0
- package/ios/TableViewCell/NoteTVC/NoteTVC.swift +37 -13
- package/ios/TableViewCell/NoteTVC/NoteTVC.xib +2 -2
- package/ios/TableViewCell/VIdeoTVC/VideoTVC.swift +10 -4
- package/ios/TableViewCell/WatchVideoTVC/WatchVideoTVC.swift +12 -0
- package/ios/TableViewCell/WatchVideoTVC/WatchVideoTVC.xib +11 -11
- package/ios/ViewControllers/AttachTransmitterViewController.swift +12 -0
- package/ios/ViewControllers/ChatWithExpertViewController.swift +1 -0
- package/ios/ViewControllers/ConnectToSensorViewController.swift +18 -0
- package/ios/ViewControllers/ConnectToTransmitterViewController.swift +15 -1
- package/ios/ViewControllers/ProvidePermissionViewController.swift +7 -0
- package/ios/ViewControllers/PutOnTheSensorViewController.swift +15 -1
- package/ios/ViewControllers/StartConnectionViewController.swift +12 -0
- package/ios/ViewModel/FinalViewModel.swift +138 -25
- package/ios/icon.xcassets/do_not_throw_sensor.imageset/Contents.json +23 -0
- package/ios/icon.xcassets/do_not_throw_sensor.imageset/image with cross.png +0 -0
- package/ios/icon.xcassets/do_not_throw_sensor.imageset/image with cross@2x.png +0 -0
- package/ios/icon.xcassets/do_not_throw_sensor.imageset/image with cross@3x.png +0 -0
- package/package.json +1 -1
|
@@ -321,18 +321,12 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
|
|
|
321
321
|
fun reconnectCgmTracky(token: String) {
|
|
322
322
|
try {
|
|
323
323
|
userToken = token
|
|
324
|
-
|
|
325
|
-
Intent(currentActivity,
|
|
324
|
+
currentActivity?.startActivity(
|
|
325
|
+
Intent(currentActivity, StartCGMActivity::class.java).putExtra(
|
|
326
326
|
"IsForReconnect",
|
|
327
327
|
true
|
|
328
328
|
)
|
|
329
|
-
|
|
330
|
-
Intent(currentActivity, PermissionActivity::class.java).putExtra(
|
|
331
|
-
"IsForReconnect",
|
|
332
|
-
true
|
|
333
|
-
)
|
|
334
|
-
}
|
|
335
|
-
currentActivity?.startActivity(intent)
|
|
329
|
+
)
|
|
336
330
|
} catch (e: Exception) {
|
|
337
331
|
Log.e("reconnectCgmTracky", "reconnectCgmTracky: ${e.message}")
|
|
338
332
|
}
|
|
@@ -348,27 +342,6 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
|
|
|
348
342
|
}
|
|
349
343
|
}
|
|
350
344
|
|
|
351
|
-
private fun areAllPermissionsGranted(): Boolean {
|
|
352
|
-
val requiredPermissions = mutableListOf<String>()
|
|
353
|
-
|
|
354
|
-
// Add Bluetooth permissions
|
|
355
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
356
|
-
requiredPermissions.addAll(PermissionUtils.BLUETOOTH_S)
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// Add location permissions
|
|
360
|
-
requiredPermissions.addAll(PermissionUtils.LOCAL_PERMISSION)
|
|
361
|
-
|
|
362
|
-
// Add camera permission
|
|
363
|
-
requiredPermissions.addAll(PermissionUtils.CAMERA_PERMISSION)
|
|
364
|
-
|
|
365
|
-
return requiredPermissions.all {
|
|
366
|
-
ContextCompat.checkSelfPermission(
|
|
367
|
-
mReactContext!!,
|
|
368
|
-
it
|
|
369
|
-
) == PackageManager.PERMISSION_GRANTED
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
345
|
|
|
373
346
|
@ReactMethod
|
|
374
347
|
fun observeGlucoseData(token: String) {
|
|
@@ -136,8 +136,8 @@ class ConnectSensorActivity : BaseBleActivity() {
|
|
|
136
136
|
binding.btnSupport.tvProceed.text = "Contact Support"
|
|
137
137
|
binding.btnRetry.tvProceed.text = "Retry"
|
|
138
138
|
|
|
139
|
-
binding.
|
|
140
|
-
binding.
|
|
139
|
+
binding.llWatchDemo.post {
|
|
140
|
+
binding.llWatchDemo.setOnClickListener {
|
|
141
141
|
Log.d("CLICK", "Layout Clicked")
|
|
142
142
|
startActivity(
|
|
143
143
|
Intent(this, VideoActivity::class.java).putExtra("VideoId", "zRlFFdr-QD4")
|
|
@@ -318,6 +318,13 @@ class ConnectSensorActivity : BaseBleActivity() {
|
|
|
318
318
|
ProgressManagement.getInstance().dismissWait(this)
|
|
319
319
|
if (isForReconnect) {
|
|
320
320
|
sendDataToRN("")
|
|
321
|
+
startActivity(
|
|
322
|
+
Intent(this, SensorConnectSuccessActivity::class.java)
|
|
323
|
+
.putExtra(
|
|
324
|
+
"IsForReconnect",
|
|
325
|
+
true
|
|
326
|
+
)
|
|
327
|
+
)
|
|
321
328
|
} else {
|
|
322
329
|
startActivity(Intent(this, SensorConnectSuccessActivity::class.java))
|
|
323
330
|
}
|
|
@@ -130,8 +130,8 @@ class SearchTransmitterActivity : BaseBleActivity() {
|
|
|
130
130
|
binding.btnSupport.tvProceed.text = "Contact Support"
|
|
131
131
|
binding.btnRetry.tvProceed.text = "Retry"
|
|
132
132
|
|
|
133
|
-
binding.
|
|
134
|
-
binding.
|
|
133
|
+
binding.llWatchDemo.post {
|
|
134
|
+
binding.llWatchDemo.setOnClickListener {
|
|
135
135
|
Log.d("CLICK", "Layout Clicked")
|
|
136
136
|
val intent = Intent(this, VideoActivity::class.java)
|
|
137
137
|
intent.putExtra("VideoId", "zRlFFdr-QD4")
|
|
@@ -531,7 +531,11 @@ class SearchTransmitterActivity : BaseBleActivity() {
|
|
|
531
531
|
|
|
532
532
|
Log.d("onDeviceConnect--->", "onDeviceConnect: " + transmitterDeviceInfo.toString())
|
|
533
533
|
if (enumDevice.getEnumDevice(transmitterDeviceInfo!!.pocDevice.name).isAbleScanQRCode) {
|
|
534
|
-
|
|
534
|
+
if (isForReconnect) {
|
|
535
|
+
proceedToNextStep()
|
|
536
|
+
} else {
|
|
537
|
+
bindSuccess()
|
|
538
|
+
}
|
|
535
539
|
} else {
|
|
536
540
|
bind(transmitterDeviceInfo!!.pocDevice)
|
|
537
541
|
}
|
|
@@ -36,127 +36,138 @@ import java.util.Locale
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
class SensorConnectSuccessActivity : AppCompatActivity() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
private lateinit var binding: ActivitySensorConnectSuccessBinding
|
|
40
|
+
lateinit var authenticateSDKService: AuthenticateSDKService
|
|
41
|
+
private val job = Job()
|
|
42
|
+
private val scope = CoroutineScope(Dispatchers.IO + job)
|
|
43
|
+
private var isForReconnect: Boolean = false
|
|
44
|
+
|
|
45
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
|
46
|
+
super.onCreate(savedInstanceState)
|
|
47
|
+
binding = ActivitySensorConnectSuccessBinding.inflate(layoutInflater)
|
|
48
|
+
enableEdgeToEdge()
|
|
49
|
+
setContentView(binding.root)
|
|
50
|
+
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
|
51
|
+
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
|
52
|
+
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
|
53
|
+
insets
|
|
54
|
+
}
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
init()
|
|
57
|
+
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
binding.tvDateTime.text = "Connected on ${formatter.format(Date()).uppercase()}"
|
|
59
|
+
private fun init() {
|
|
60
|
+
isForReconnect = intent.getBooleanExtra("IsForReconnect", false)
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
.load(R.drawable.success_anim)
|
|
65
|
-
.into(binding.ivSuccess)
|
|
62
|
+
val formatter = SimpleDateFormat("hh:mm a", Locale.getDefault())
|
|
63
|
+
binding.tvDateTime.text = "Connected on ${formatter.format(Date()).uppercase()}"
|
|
66
64
|
|
|
67
|
-
|
|
65
|
+
Glide.with(this)
|
|
66
|
+
.asGif()
|
|
67
|
+
.load(R.drawable.success_anim)
|
|
68
|
+
.into(binding.ivSuccess)
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
startActivity(Intent(this, HelpActivity::class.java))
|
|
71
|
-
}
|
|
70
|
+
authenticateSDKService = AuthenticateSDKService(scope = scope)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
)
|
|
77
|
-
}
|
|
72
|
+
binding.toolbar.btnWhatsapp.setOnClickListener {
|
|
73
|
+
startActivity(Intent(this, HelpActivity::class.java))
|
|
74
|
+
}
|
|
78
75
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
binding.toolbar.btnWatchDemo.setOnClickListener {
|
|
77
|
+
startActivity(
|
|
78
|
+
Intent(this, VideoActivity::class.java).putExtra("VideoId", "r5Zemc4R044")
|
|
79
|
+
)
|
|
80
|
+
}
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
binding.commonButton.btnProceed.setOnClickListener {
|
|
83
|
+
if (isForReconnect) {
|
|
84
|
+
startActivity(Intent(this, PlaceTransmitterActivity::class.java))
|
|
85
|
+
} else {
|
|
86
|
+
startActivity(Intent(this, PlaceSensorActivity::class.java))
|
|
87
|
+
}
|
|
88
|
+
finish()
|
|
89
|
+
}
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
openExitDialog()
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
onBackPressedDispatcher.addCallback(this, callback)
|
|
94
|
-
|
|
95
|
-
postEventDataToAPI()
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
private fun postEventDataToAPI() {
|
|
99
|
-
val sharedPreferencesLibraryUtil = SharedPreferencesLibraryUtil(this)
|
|
100
|
-
val information = sharedPreferencesLibraryUtil.qrInformation
|
|
101
|
-
|
|
102
|
-
val rawData = JSONObject()
|
|
103
|
-
rawData.put("transmitterName", information.transmitterName)
|
|
104
|
-
rawData.put("SensorId", information.sensor)
|
|
105
|
-
rawData.put("R", information.r)
|
|
106
|
-
rawData.put("K", information.k)
|
|
107
|
-
rawData.put("Sensor", information.sensor)
|
|
108
|
-
rawData.put("timeInMillis", information.timeInMillis)
|
|
109
|
-
|
|
110
|
-
val obj = JSONObject()
|
|
111
|
-
obj.put("sensorId", information.sensor)
|
|
112
|
-
obj.put("status", DeviceStatus.CONNECTED.id)
|
|
113
|
-
obj.put("rawData", rawData)
|
|
114
|
-
|
|
115
|
-
authenticateSDKService.postDeviceData(
|
|
116
|
-
environment = if ("uat".uppercase() == "PROD") TATVA_ENVIRONMENT.PROD else TATVA_ENVIRONMENT.STAGE,
|
|
117
|
-
data = obj.toString(),
|
|
118
|
-
token = CgmTrackyLibModule.userToken,
|
|
119
|
-
loaderListener = object : LoaderListener {
|
|
120
|
-
override fun onShowLoader() {
|
|
121
|
-
ProgressManagement.getInstance()
|
|
122
|
-
.showWait(this@SensorConnectSuccessActivity, ProgressType.PROGRESSDIALOG_CONNECT, null)
|
|
91
|
+
binding.toolbar.btnClose.setOnClickListener {
|
|
92
|
+
openExitDialog()
|
|
123
93
|
}
|
|
124
94
|
|
|
125
|
-
|
|
126
|
-
|
|
95
|
+
val callback: OnBackPressedCallback = object : OnBackPressedCallback(true) {
|
|
96
|
+
override fun handleOnBackPressed() {
|
|
97
|
+
openExitDialog()
|
|
98
|
+
}
|
|
127
99
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
100
|
+
onBackPressedDispatcher.addCallback(this, callback)
|
|
101
|
+
|
|
102
|
+
postEventDataToAPI()
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private fun postEventDataToAPI() {
|
|
106
|
+
val sharedPreferencesLibraryUtil = SharedPreferencesLibraryUtil(this)
|
|
107
|
+
val information = sharedPreferencesLibraryUtil.qrInformation
|
|
108
|
+
|
|
109
|
+
val rawData = JSONObject()
|
|
110
|
+
rawData.put("transmitterName", information.transmitterName)
|
|
111
|
+
rawData.put("SensorId", information.sensor)
|
|
112
|
+
rawData.put("R", information.r)
|
|
113
|
+
rawData.put("K", information.k)
|
|
114
|
+
rawData.put("Sensor", information.sensor)
|
|
115
|
+
rawData.put("timeInMillis", information.timeInMillis)
|
|
116
|
+
|
|
117
|
+
val obj = JSONObject()
|
|
118
|
+
obj.put("sensorId", information.sensor)
|
|
119
|
+
obj.put("status", DeviceStatus.CONNECTED.id)
|
|
120
|
+
obj.put("rawData", rawData)
|
|
121
|
+
|
|
122
|
+
authenticateSDKService.postDeviceData(
|
|
123
|
+
environment = if ("uat".uppercase() == "PROD") TATVA_ENVIRONMENT.PROD else TATVA_ENVIRONMENT.STAGE,
|
|
124
|
+
data = obj.toString(),
|
|
125
|
+
token = CgmTrackyLibModule.userToken,
|
|
126
|
+
loaderListener = object : LoaderListener {
|
|
127
|
+
override fun onShowLoader() {
|
|
128
|
+
ProgressManagement.getInstance()
|
|
129
|
+
.showWait(
|
|
130
|
+
this@SensorConnectSuccessActivity,
|
|
131
|
+
ProgressType.PROGRESSDIALOG_CONNECT,
|
|
132
|
+
null
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
override fun onHideLoader() {
|
|
137
|
+
ProgressManagement.getInstance().dismissWait(this@SensorConnectSuccessActivity)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
}
|
|
131
142
|
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
private fun openExitDialog() {
|
|
144
|
+
val binding = ExitDialogBottomsheetBinding.inflate(layoutInflater)
|
|
134
145
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
146
|
+
val dialog = Dialog(this)
|
|
147
|
+
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
|
148
|
+
dialog.setContentView(binding.root)
|
|
138
149
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
val window = dialog.window
|
|
151
|
+
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
|
152
|
+
window?.setGravity(Gravity.BOTTOM)
|
|
153
|
+
window?.setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
|
|
143
154
|
|
|
144
|
-
|
|
155
|
+
binding.btnExit.tvProceed.text = "Exit"
|
|
145
156
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
157
|
+
binding.btnExit.root.setOnClickListener(View.OnClickListener { v: View? ->
|
|
158
|
+
finish()
|
|
159
|
+
dialog.dismiss()
|
|
160
|
+
})
|
|
150
161
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
162
|
+
binding.btnCancel.root.setOnClickListener(View.OnClickListener { v: View? ->
|
|
163
|
+
dialog.dismiss()
|
|
164
|
+
})
|
|
154
165
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
166
|
+
binding.closeButton.setOnClickListener(View.OnClickListener { v: View? ->
|
|
167
|
+
dialog.dismiss()
|
|
168
|
+
})
|
|
158
169
|
|
|
159
|
-
|
|
160
|
-
|
|
170
|
+
dialog.show()
|
|
171
|
+
}
|
|
161
172
|
|
|
162
173
|
}
|
|
@@ -2,7 +2,9 @@ package com.mytatvarnsdk.activity
|
|
|
2
2
|
|
|
3
3
|
import android.app.Dialog
|
|
4
4
|
import android.content.Intent
|
|
5
|
+
import android.content.pm.PackageManager
|
|
5
6
|
import android.graphics.Color
|
|
7
|
+
import android.os.Build
|
|
6
8
|
import android.os.Bundle
|
|
7
9
|
import android.view.Gravity
|
|
8
10
|
import android.view.View
|
|
@@ -11,9 +13,11 @@ import android.view.Window
|
|
|
11
13
|
import androidx.activity.OnBackPressedCallback
|
|
12
14
|
import androidx.activity.enableEdgeToEdge
|
|
13
15
|
import androidx.appcompat.app.AppCompatActivity
|
|
16
|
+
import androidx.core.content.ContextCompat
|
|
14
17
|
import androidx.core.graphics.drawable.toDrawable
|
|
15
18
|
import androidx.core.view.ViewCompat
|
|
16
19
|
import androidx.core.view.WindowInsetsCompat
|
|
20
|
+
import com.mytatvarnsdk.CgmTrackyLibModule.Companion.mReactContext
|
|
17
21
|
import com.mytatvarnsdk.R
|
|
18
22
|
import com.mytatvarnsdk.databinding.ActivityStartCgmactivityBinding
|
|
19
23
|
import com.mytatvarnsdk.databinding.ExitDialogBottomsheetBinding
|
|
@@ -21,6 +25,7 @@ import com.mytatvarnsdk.databinding.ExitDialogBottomsheetBinding
|
|
|
21
25
|
|
|
22
26
|
class StartCGMActivity : AppCompatActivity() {
|
|
23
27
|
private lateinit var binding: ActivityStartCgmactivityBinding
|
|
28
|
+
private var isForReconnect: Boolean = false
|
|
24
29
|
|
|
25
30
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
26
31
|
super.onCreate(savedInstanceState)
|
|
@@ -37,9 +42,31 @@ class StartCGMActivity : AppCompatActivity() {
|
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
private fun init() {
|
|
40
|
-
|
|
45
|
+
isForReconnect = intent.getBooleanExtra("IsForReconnect", false)
|
|
46
|
+
|
|
47
|
+
if (isForReconnect) {
|
|
48
|
+
binding.commonButton.tvProceed.text = "Start Reconnection Journey"
|
|
49
|
+
} else {
|
|
50
|
+
binding.commonButton.tvProceed.text = "Start Connection Journey"
|
|
51
|
+
}
|
|
52
|
+
|
|
41
53
|
binding.commonButton.btnProceed.setOnClickListener {
|
|
42
|
-
|
|
54
|
+
if (isForReconnect) {
|
|
55
|
+
val intent = if (areAllPermissionsGranted()) {
|
|
56
|
+
Intent(this, SearchTransmitterActivity::class.java).putExtra(
|
|
57
|
+
"IsForReconnect",
|
|
58
|
+
true
|
|
59
|
+
)
|
|
60
|
+
} else {
|
|
61
|
+
Intent(this, PermissionActivity::class.java).putExtra(
|
|
62
|
+
"IsForReconnect",
|
|
63
|
+
true
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
startActivity(intent)
|
|
67
|
+
} else {
|
|
68
|
+
startActivity(Intent(this@StartCGMActivity, PermissionActivity::class.java))
|
|
69
|
+
}
|
|
43
70
|
finish()
|
|
44
71
|
}
|
|
45
72
|
|
|
@@ -65,6 +92,27 @@ class StartCGMActivity : AppCompatActivity() {
|
|
|
65
92
|
onBackPressedDispatcher.addCallback(this, callback)
|
|
66
93
|
}
|
|
67
94
|
|
|
95
|
+
private fun areAllPermissionsGranted(): Boolean {
|
|
96
|
+
val requiredPermissions = mutableListOf<String>()
|
|
97
|
+
|
|
98
|
+
// Add Bluetooth permissions
|
|
99
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
100
|
+
requiredPermissions.addAll(PermissionUtils.BLUETOOTH_S)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Add location permissions
|
|
104
|
+
requiredPermissions.addAll(PermissionUtils.LOCAL_PERMISSION)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
return requiredPermissions.all {
|
|
108
|
+
ContextCompat.checkSelfPermission(
|
|
109
|
+
mReactContext!!,
|
|
110
|
+
it
|
|
111
|
+
) == PackageManager.PERMISSION_GRANTED
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
68
116
|
private fun openExitDialog() {
|
|
69
117
|
val binding = ExitDialogBottomsheetBinding.inflate(layoutInflater)
|
|
70
118
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
-
<item android:color="
|
|
3
|
+
<item android:color="#000000" android:state_checked="true"/>
|
|
4
4
|
<item android:color="#333333"/>
|
|
5
5
|
</selector>
|
|
Binary file
|
|
@@ -440,8 +440,8 @@
|
|
|
440
440
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
441
441
|
|
|
442
442
|
|
|
443
|
-
<
|
|
444
|
-
android:id="@+id/
|
|
443
|
+
<LinearLayout
|
|
444
|
+
android:id="@+id/llWatchDemo"
|
|
445
445
|
android:layout_width="match_parent"
|
|
446
446
|
android:layout_height="wrap_content"
|
|
447
447
|
android:layout_marginHorizontal="20dp"
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
android:textColor="#2D3282"
|
|
474
474
|
android:textSize="@dimen/text_12sp" />
|
|
475
475
|
|
|
476
|
-
</
|
|
476
|
+
</LinearLayout>
|
|
477
477
|
|
|
478
478
|
<TextView
|
|
479
479
|
android:layout_width="0dp"
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
android:textSize="14sp"
|
|
489
489
|
app:layout_constraintEnd_toEndOf="parent"
|
|
490
490
|
app:layout_constraintStart_toStartOf="parent"
|
|
491
|
-
app:layout_constraintTop_toBottomOf="@id/
|
|
491
|
+
app:layout_constraintTop_toBottomOf="@id/llWatchDemo" />
|
|
492
492
|
|
|
493
493
|
|
|
494
494
|
<androidx.appcompat.widget.LinearLayoutCompat
|
|
@@ -102,7 +102,6 @@
|
|
|
102
102
|
android:layout_width="wrap_content"
|
|
103
103
|
android:layout_height="wrap_content"
|
|
104
104
|
android:layout_marginBottom="12dp"
|
|
105
|
-
android:drawableStart="@drawable/custom_radio_icon_selector"
|
|
106
105
|
android:drawablePadding="10dp"
|
|
107
106
|
android:text="Purchasing New CGM" />
|
|
108
107
|
|
|
@@ -112,7 +111,6 @@
|
|
|
112
111
|
android:layout_width="wrap_content"
|
|
113
112
|
android:layout_height="wrap_content"
|
|
114
113
|
android:layout_marginBottom="12dp"
|
|
115
|
-
android:drawableStart="@drawable/custom_radio_icon_selector"
|
|
116
114
|
android:drawablePadding="10dp"
|
|
117
115
|
android:text="Connecting My CGM" />
|
|
118
116
|
|
|
@@ -121,7 +119,6 @@
|
|
|
121
119
|
style="@style/CustomRadioButton"
|
|
122
120
|
android:layout_width="wrap_content"
|
|
123
121
|
android:layout_height="wrap_content"
|
|
124
|
-
android:drawableStart="@drawable/custom_radio_icon_selector"
|
|
125
122
|
android:drawablePadding="10dp"
|
|
126
123
|
android:text="Having troubles after connection" />
|
|
127
124
|
</RadioGroup>
|
|
@@ -691,8 +691,8 @@
|
|
|
691
691
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
692
692
|
|
|
693
693
|
|
|
694
|
-
<
|
|
695
|
-
android:id="@+id/
|
|
694
|
+
<LinearLayout
|
|
695
|
+
android:id="@+id/llWatchDemo"
|
|
696
696
|
android:layout_width="match_parent"
|
|
697
697
|
android:layout_height="wrap_content"
|
|
698
698
|
android:layout_marginHorizontal="20dp"
|
|
@@ -724,7 +724,7 @@
|
|
|
724
724
|
android:textColor="#2D3282"
|
|
725
725
|
android:textSize="@dimen/text_12sp" />
|
|
726
726
|
|
|
727
|
-
</
|
|
727
|
+
</LinearLayout>
|
|
728
728
|
|
|
729
729
|
<TextView
|
|
730
730
|
android:layout_width="0dp"
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
android:textSize="14sp"
|
|
740
740
|
app:layout_constraintEnd_toEndOf="parent"
|
|
741
741
|
app:layout_constraintStart_toStartOf="parent"
|
|
742
|
-
app:layout_constraintTop_toBottomOf="@id/
|
|
742
|
+
app:layout_constraintTop_toBottomOf="@id/llWatchDemo" />
|
|
743
743
|
|
|
744
744
|
|
|
745
745
|
<androidx.appcompat.widget.LinearLayoutCompat
|