react-native-mytatva-rn-sdk 1.2.10 → 1.2.12
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/activity/PermissionActivity.kt +32 -1
- package/android/src/main/res/drawable/bg_light_yellow.xml +10 -0
- package/android/src/main/res/drawable/ic_setting.xml +9 -0
- package/android/src/main/res/drawable/img_permission_1.png +0 -0
- package/android/src/main/res/drawable/img_permission_2.png +0 -0
- package/android/src/main/res/layout/bluetooth_dialog_bottomsheet.xml +106 -0
- package/ios/Custom/CustomOverlayButton.swift +4 -4
- package/ios/Custom/CustomTopUIView.swift +3 -3
- package/ios/MyReactNativeBridge.m +26 -14
- package/ios/Storyboard/{Base.lproj/MainCGM.storyboard → MainCGM.storyboard} +72 -71
- package/ios/Support/Global.swift +11 -0
- package/ios/TableViewCell/ChargingIndicatorTVC/ChargingIndicatorTVC.swift +4 -0
- package/ios/TableViewCell/ChargingIndicatorTVC/ChargingIndicatorTVC.xib +6 -5
- package/ios/TableViewCell/ChatOptionTVC/ChatOptionTVC.swift +2 -2
- package/ios/TableViewCell/ChatOptionTVC/ChatOptionTVC.xib +4 -5
- package/ios/TableViewCell/ConnectDeviceTVC/ConnectDeviceTVC.swift +5 -0
- package/ios/TableViewCell/ConnectDeviceTVC/ConnectDeviceTVC.xib +6 -5
- package/ios/TableViewCell/ConnectSuccessTVC/ConnectSuccessTVC.swift +7 -1
- package/ios/TableViewCell/ConnectSuccessTVC/ConnectSuccessTVC.xib +6 -4
- package/ios/TableViewCell/ImageTVC/ImageTVC.swift +2 -0
- package/ios/TableViewCell/ImageTVC/ImageTVC.xib +5 -4
- package/ios/TableViewCell/LabelTVC/LabelTVC.xib +3 -4
- package/ios/TableViewCell/NoteTVC/NoteTVC.swift +2 -0
- package/ios/TableViewCell/NoteTVC/NoteTVC.xib +4 -4
- package/ios/TableViewCell/PodDetailsTVC/PodDetailsTVC.swift +7 -0
- package/ios/TableViewCell/PodDetailsTVC/PodDetailsTVC.xib +7 -5
- package/ios/TableViewCell/SearchDeviceTVC/SearchDeviceTVC.xib +4 -4
- package/ios/TableViewCell/SeparatorTVC/SeparatorTVC.xib +3 -3
- package/ios/TableViewCell/SwitchTVC/SwitchTVC.xib +5 -6
- package/ios/TableViewCell/VIdeoTVC/VideoTVC.xib +4 -4
- package/ios/TableViewCell/VerticalLabelsTVC/VerticalLabelsTVC.xib +3 -3
- package/ios/TableViewCell/WatchVideoTVC/WatchVideoTVC.swift +3 -0
- package/ios/TableViewCell/WatchVideoTVC/WatchVideoTVC.xib +5 -4
- package/ios/ViewControllers/AttachTransmitterViewController.swift +1 -1
- package/ios/ViewControllers/ChatWithExpertViewController.swift +2 -0
- package/ios/ViewControllers/ConnectToSensorViewController.swift +2 -2
- package/ios/ViewControllers/ConnectToTransmitterViewController.swift +1 -1
- package/ios/ViewControllers/ExitJourneyViewController.swift +11 -1
- package/ios/ViewControllers/PutOnTheSensorViewController.swift +1 -1
- package/ios/ViewControllers/StartConnectionViewController.swift +1 -1
- package/ios/ViewModel/FinalViewModel.swift +1 -1
- package/package.json +1 -2
- package/react-native-mytatva-rn-sdk.podspec +6 -2
- package/ios/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -35
- package/ios/Storyboard/Base.lproj/LaunchScreen.storyboard +0 -25
- /package/ios/{Assets.xcassets → icon.xcassets}/AccentColor.colorset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/CGM_with_Toggle.imageset/CGM_with_Toggle.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/CGM_with_Toggle.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/Take_out_transmitter.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/Take_out_transmitter.imageset/Take our transmitter.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/charging.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/charging.imageset/charging.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/charging_pod.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/charging_pod.imageset/charging_pod.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/close_pod.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/close_pod.imageset/Group 1000005563.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/close_pod.imageset/Group 1000005563@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/close_pod.imageset/Group 1000005563@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/do_not_place_inside.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/do_not_place_inside.imageset/do_not_place_inside.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/flip_the_reference.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/flip_the_reference.imageset/flip_the_reference.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/fully_charged.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/fully_charged.imageset/fully_charged.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/green.colorset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_arrow.imageset/7.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_arrow.imageset/7@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_arrow.imageset/7@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_arrow.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back.imageset/7.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back.imageset/7@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back.imageset/7@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back_arrow.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back_arrow.imageset/image 17 (Traced).png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back_arrow.imageset/image 17 (Traced)@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_back_arrow.imageset/image 17 (Traced)@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_circle.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_circle.imageset/circle.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_circle.imageset/circle@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_circle.imageset/circle@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close.imageset/close button.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close.imageset/close button@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close.imageset/close button@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close_popup.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close_popup.imageset/Frame.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close_popup.imageset/Frame@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_close_popup.imageset/Frame@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_green_arrow.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_green_arrow.imageset/image 17 (Traced).png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_green_arrow.imageset/image 17 (Traced)@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_green_arrow.imageset/image 17 (Traced)@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_play.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_play.imageset/Play.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_play.imageset/Play@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_play.imageset/Play@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_selected.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_selected.imageset/Frame.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_selected.imageset/Frame@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_selected.imageset/Frame@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsApp_only.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsApp_only.imageset/WhatsApp.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsApp_only.imageset/WhatsApp@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsApp_only.imageset/WhatsApp@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsapp.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsapp.imageset/Frame 1000006343.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsapp.imageset/Frame 1000006343@2x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/ic_whatsapp.imageset/Frame 1000006343@3x.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/indigo.colorset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/mandala.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/mandala.imageset/ending.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/open_pod.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/open_pod.imageset/Screenshot 2025-04-22 at 8.07.34/342/200/257PM 1.png" +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/open_pod.imageset/Screenshot 2025-04-22 at 8.07.34/342/200/257PM 1@2x.png" +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/open_pod.imageset/Screenshot 2025-04-22 at 8.07.34/342/200/257PM 1@3x.png" +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/step4.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/step4.imageset/step4.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/step5.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/step5.imageset/step5.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/transmitter_image.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/transmitter_image.imageset/transmitter_image.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/transmitter_shadow.imageset/CGM Shadow.png +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/transmitter_shadow.imageset/Contents.json +0 -0
- /package/ios/{Assets.xcassets → icon.xcassets}/unselectedGray.colorset/Contents.json +0 -0
|
@@ -9,8 +9,10 @@ import android.content.Context
|
|
|
9
9
|
import android.content.Intent
|
|
10
10
|
import android.content.pm.PackageManager
|
|
11
11
|
import android.graphics.Color
|
|
12
|
+
import android.net.Uri
|
|
12
13
|
import android.os.Build
|
|
13
14
|
import android.os.Bundle
|
|
15
|
+
import android.provider.Settings
|
|
14
16
|
import android.util.Log
|
|
15
17
|
import android.view.Gravity
|
|
16
18
|
import android.view.View
|
|
@@ -29,9 +31,9 @@ import androidx.core.view.WindowInsetsCompat
|
|
|
29
31
|
import cgmblelib.utils.ConstantsLibrary
|
|
30
32
|
import com.mytatvarnsdk.base.BasePermissionActivity
|
|
31
33
|
import com.mytatvarnsdk.databinding.ActivityPermissionBinding
|
|
34
|
+
import com.mytatvarnsdk.databinding.BluetoothDialogBottomsheetBinding
|
|
32
35
|
import com.mytatvarnsdk.databinding.ExitDialogBottomsheetBinding
|
|
33
36
|
|
|
34
|
-
|
|
35
37
|
class PermissionActivity : BasePermissionActivity() {
|
|
36
38
|
private lateinit var binding: ActivityPermissionBinding
|
|
37
39
|
private val LOCATION_REQUEST_CODE = 101
|
|
@@ -147,6 +149,10 @@ class PermissionActivity : BasePermissionActivity() {
|
|
|
147
149
|
startActivity(Intent(this, HelpActivity::class.java))
|
|
148
150
|
}
|
|
149
151
|
|
|
152
|
+
binding.tvKnowMore.setOnClickListener {
|
|
153
|
+
openBluetoothDialog()
|
|
154
|
+
}
|
|
155
|
+
|
|
150
156
|
binding.toolbar.btnClose.setOnClickListener {
|
|
151
157
|
openExitDialog()
|
|
152
158
|
}
|
|
@@ -159,6 +165,31 @@ class PermissionActivity : BasePermissionActivity() {
|
|
|
159
165
|
onBackPressedDispatcher.addCallback(this, callback)
|
|
160
166
|
}
|
|
161
167
|
|
|
168
|
+
private fun openBluetoothDialog() {
|
|
169
|
+
val binding = BluetoothDialogBottomsheetBinding.inflate(layoutInflater)
|
|
170
|
+
|
|
171
|
+
val dialog = Dialog(this)
|
|
172
|
+
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
|
173
|
+
dialog.setContentView(binding.root)
|
|
174
|
+
|
|
175
|
+
val window = dialog.window
|
|
176
|
+
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
|
177
|
+
window?.setGravity(Gravity.BOTTOM)
|
|
178
|
+
window?.setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
|
|
179
|
+
|
|
180
|
+
binding.tvKnowMore.setOnClickListener {
|
|
181
|
+
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
|
182
|
+
data = Uri.fromParts("package", packageName, null)
|
|
183
|
+
}
|
|
184
|
+
startActivity(intent)
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
binding.closeButton.setOnClickListener(View.OnClickListener { v: View? ->
|
|
188
|
+
dialog.dismiss()
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
dialog.show()
|
|
192
|
+
}
|
|
162
193
|
|
|
163
194
|
private fun openExitDialog() {
|
|
164
195
|
val binding = ExitDialogBottomsheetBinding.inflate(layoutInflater)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:shape="rectangle">
|
|
4
|
+
<solid android:color="#FFFBEE" />
|
|
5
|
+
<corners
|
|
6
|
+
android:bottomLeftRadius="15dp"
|
|
7
|
+
android:bottomRightRadius="15dp"
|
|
8
|
+
android:topLeftRadius="15dp"
|
|
9
|
+
android:topRightRadius="15dp" />
|
|
10
|
+
</shape>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
android:width="17dp"
|
|
3
|
+
android:height="18dp"
|
|
4
|
+
android:viewportWidth="17"
|
|
5
|
+
android:viewportHeight="18">
|
|
6
|
+
<path
|
|
7
|
+
android:pathData="M8.51,0.875C9.122,0.882 9.731,0.953 10.328,1.086C10.589,1.144 10.784,1.361 10.813,1.627L10.955,2.899C11.019,3.483 11.513,3.926 12.101,3.926C12.259,3.927 12.415,3.894 12.561,3.829L13.728,3.316C13.971,3.21 14.255,3.268 14.436,3.461C15.28,4.362 15.908,5.443 16.273,6.621C16.352,6.875 16.261,7.152 16.047,7.31L15.013,8.072C14.717,8.289 14.543,8.633 14.543,9C14.543,9.366 14.717,9.71 15.013,9.927L16.049,10.69C16.263,10.848 16.354,11.124 16.275,11.379C15.91,12.557 15.282,13.637 14.439,14.538C14.258,14.732 13.974,14.79 13.731,14.684L12.559,14.17C12.224,14.024 11.839,14.045 11.522,14.228C11.205,14.411 10.995,14.734 10.954,15.098L10.814,16.37C10.784,16.633 10.594,16.848 10.337,16.91C9.13,17.197 7.872,17.197 6.665,16.91C6.409,16.848 6.218,16.633 6.189,16.37L6.048,15.1C6.007,14.737 5.796,14.415 5.479,14.233C5.162,14.05 4.778,14.029 4.444,14.175L3.272,14.688C3.029,14.794 2.745,14.736 2.564,14.542C1.721,13.64 1.093,12.559 0.728,11.379C0.649,11.125 0.74,10.849 0.954,10.691L1.99,9.928C2.286,9.711 2.46,9.367 2.46,9C2.46,8.634 2.286,8.29 1.99,8.073L0.955,7.311C0.74,7.153 0.649,6.876 0.728,6.622C1.094,5.443 1.722,4.363 2.565,3.462C2.747,3.269 3.03,3.21 3.273,3.317L4.44,3.83C4.776,3.977 5.162,3.955 5.48,3.769C5.797,3.585 6.008,3.262 6.049,2.898L6.19,1.627C6.22,1.361 6.415,1.144 6.676,1.086C7.274,0.953 7.884,0.882 8.51,0.875ZM8.5,6.5C7.119,6.5 6,7.619 6,9C6,10.381 7.119,11.5 8.5,11.5C9.881,11.5 11,10.381 11,9C11,7.619 9.881,6.5 8.5,6.5Z"
|
|
8
|
+
android:fillColor="#299D6B"/>
|
|
9
|
+
</vector>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
android:id="@+id/bottom_sheet"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="wrap_content"
|
|
7
|
+
android:layout_marginHorizontal="10dp"
|
|
8
|
+
android:background="@drawable/bottom_sheet_background"
|
|
9
|
+
android:orientation="vertical"
|
|
10
|
+
android:padding="16dp">
|
|
11
|
+
|
|
12
|
+
<RelativeLayout
|
|
13
|
+
android:layout_width="match_parent"
|
|
14
|
+
android:layout_height="wrap_content"
|
|
15
|
+
android:layout_marginBottom="16dp">
|
|
16
|
+
|
|
17
|
+
<TextView
|
|
18
|
+
android:id="@+id/title_text"
|
|
19
|
+
android:layout_width="wrap_content"
|
|
20
|
+
android:layout_height="wrap_content"
|
|
21
|
+
android:layout_alignParentStart="true"
|
|
22
|
+
android:layout_centerVertical="true"
|
|
23
|
+
android:fontFamily="@font/roboto_bold"
|
|
24
|
+
android:text="Bluetooth Connection"
|
|
25
|
+
android:textColor="#101828"
|
|
26
|
+
android:textSize="18sp" />
|
|
27
|
+
|
|
28
|
+
<androidx.appcompat.widget.AppCompatImageView
|
|
29
|
+
android:id="@+id/close_button"
|
|
30
|
+
android:layout_width="24dp"
|
|
31
|
+
android:layout_height="24dp"
|
|
32
|
+
android:layout_alignParentEnd="true"
|
|
33
|
+
android:layout_centerVertical="true"
|
|
34
|
+
android:src="@drawable/ic_close_gray" />
|
|
35
|
+
</RelativeLayout>
|
|
36
|
+
|
|
37
|
+
<TextView
|
|
38
|
+
android:layout_width="match_parent"
|
|
39
|
+
android:layout_height="wrap_content"
|
|
40
|
+
android:layout_marginBottom="20dp"
|
|
41
|
+
android:fontFamily="@font/roboto_regular"
|
|
42
|
+
android:text="GoodFlip needs Bluetooth access to sync your CGM data. Please allow Bluetooth access to continue connecting your device."
|
|
43
|
+
android:textColor="#344054"
|
|
44
|
+
android:textSize="15sp" />
|
|
45
|
+
|
|
46
|
+
<androidx.constraintlayout.widget.ConstraintLayout
|
|
47
|
+
android:layout_width="match_parent"
|
|
48
|
+
android:layout_height="wrap_content"
|
|
49
|
+
android:background="@drawable/bg_light_yellow">
|
|
50
|
+
|
|
51
|
+
<androidx.appcompat.widget.AppCompatImageView
|
|
52
|
+
android:id="@+id/iv1"
|
|
53
|
+
android:layout_width="120dp"
|
|
54
|
+
android:layout_height="80dp"
|
|
55
|
+
android:layout_marginHorizontal="15dp"
|
|
56
|
+
android:layout_marginVertical="10dp"
|
|
57
|
+
android:src="@drawable/img_permission_1"
|
|
58
|
+
app:layout_constraintEnd_toStartOf="@+id/iv2"
|
|
59
|
+
app:layout_constraintHorizontal_chainStyle="packed"
|
|
60
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
61
|
+
app:layout_constraintTop_toTopOf="parent" />
|
|
62
|
+
|
|
63
|
+
<androidx.appcompat.widget.AppCompatImageView
|
|
64
|
+
android:id="@+id/iv2"
|
|
65
|
+
android:layout_width="120dp"
|
|
66
|
+
android:layout_height="80dp"
|
|
67
|
+
android:layout_marginHorizontal="15dp"
|
|
68
|
+
android:layout_marginVertical="10dp"
|
|
69
|
+
android:src="@drawable/img_permission_2"
|
|
70
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
71
|
+
app:layout_constraintHorizontal_chainStyle="packed"
|
|
72
|
+
app:layout_constraintStart_toEndOf="@+id/iv1"
|
|
73
|
+
app:layout_constraintTop_toTopOf="parent" />
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<androidx.appcompat.widget.AppCompatImageView
|
|
77
|
+
android:id="@+id/ivSetting"
|
|
78
|
+
android:layout_width="16dp"
|
|
79
|
+
android:layout_height="16dp"
|
|
80
|
+
android:layout_marginVertical="15dp"
|
|
81
|
+
android:src="@drawable/ic_setting"
|
|
82
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
83
|
+
app:layout_constraintEnd_toStartOf="@+id/tvKnowMore"
|
|
84
|
+
app:layout_constraintHorizontal_chainStyle="packed"
|
|
85
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
86
|
+
app:layout_constraintTop_toBottomOf="@+id/iv1" />
|
|
87
|
+
|
|
88
|
+
<TextView
|
|
89
|
+
android:id="@+id/tvKnowMore"
|
|
90
|
+
android:layout_width="wrap_content"
|
|
91
|
+
android:layout_height="wrap_content"
|
|
92
|
+
android:layout_marginHorizontal="5dp"
|
|
93
|
+
android:layout_marginVertical="15dp"
|
|
94
|
+
android:fontFamily="@font/roboto_semibold"
|
|
95
|
+
android:text="@string/txt_open_setting"
|
|
96
|
+
android:textColor="#299D6B"
|
|
97
|
+
android:textSize="14sp"
|
|
98
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
99
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
100
|
+
app:layout_constraintHorizontal_chainStyle="packed"
|
|
101
|
+
app:layout_constraintStart_toEndOf="@+id/ivSetting"
|
|
102
|
+
app:layout_constraintTop_toBottomOf="@+id/iv1" />
|
|
103
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</LinearLayout>
|
|
@@ -46,7 +46,7 @@ class CustomOverlayButton: UIView {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@IBInspectable var image: UIImage? =
|
|
49
|
+
@IBInspectable var image: UIImage? = loadImage(named: "ic_arrow") {
|
|
50
50
|
didSet {
|
|
51
51
|
rightImageView.image = image
|
|
52
52
|
}
|
|
@@ -90,12 +90,12 @@ class CustomOverlayButton: UIView {
|
|
|
90
90
|
// ImageView
|
|
91
91
|
rightImageView.translatesAutoresizingMaskIntoConstraints = false
|
|
92
92
|
rightImageView.contentMode = .scaleAspectFit
|
|
93
|
-
rightImageView.image =
|
|
93
|
+
rightImageView.image = loadImage(named: "ic_arrow")
|
|
94
94
|
foregroundView.addSubview(rightImageView)
|
|
95
95
|
|
|
96
96
|
leftImageView.translatesAutoresizingMaskIntoConstraints = false
|
|
97
97
|
leftImageView.contentMode = .scaleAspectFit
|
|
98
|
-
leftImageView.image =
|
|
98
|
+
leftImageView.image = loadImage(named: "ic_back_arrow")
|
|
99
99
|
leftImageView.isHidden = true
|
|
100
100
|
foregroundView.addSubview(leftImageView)
|
|
101
101
|
|
|
@@ -194,7 +194,7 @@ class CustomOverlayButton: UIView {
|
|
|
194
194
|
func showLeftWhatsappImage() {
|
|
195
195
|
rightImageView.isHidden = true
|
|
196
196
|
leftImageView.isHidden = false
|
|
197
|
-
leftImageView.image =
|
|
197
|
+
leftImageView.image = loadImage(named: "ic_whatsApp_only")
|
|
198
198
|
textLabelCenterXConstraint.constant = 12
|
|
199
199
|
|
|
200
200
|
setNeedsLayout()
|
|
@@ -18,7 +18,7 @@ class CustomTopUIView: UIView {
|
|
|
18
18
|
button.layer.masksToBounds = true
|
|
19
19
|
button.titleLabel?.font = FontManager.font(ofSize: 14, weight: .medium)
|
|
20
20
|
button.tintColor = .white
|
|
21
|
-
let playImage =
|
|
21
|
+
let playImage = loadImage(named: "ic_play")?.withTintColor(.white) ?? UIImage(systemName: "play.fill")?.withRenderingMode(.alwaysOriginal).withTintColor(.white)
|
|
22
22
|
button.setImage(playImage, for: .normal)
|
|
23
23
|
|
|
24
24
|
button.translatesAutoresizingMaskIntoConstraints = false
|
|
@@ -27,7 +27,7 @@ class CustomTopUIView: UIView {
|
|
|
27
27
|
|
|
28
28
|
private let whatsappButton: UIButton = {
|
|
29
29
|
let button = UIButton(type: .system)
|
|
30
|
-
let image =
|
|
30
|
+
let image = loadImage(named: "ic_whatsapp") ?? UIImage(systemName: "message.fill")!
|
|
31
31
|
button.setImage(image.withRenderingMode(.alwaysOriginal), for: .normal)
|
|
32
32
|
button.backgroundColor = .green
|
|
33
33
|
button.layer.cornerRadius = 18
|
|
@@ -37,7 +37,7 @@ class CustomTopUIView: UIView {
|
|
|
37
37
|
|
|
38
38
|
private let closeButton: UIButton = {
|
|
39
39
|
let button = UIButton(type: .custom)
|
|
40
|
-
let image =
|
|
40
|
+
let image = loadImage(named: "ic_close")
|
|
41
41
|
button.setImage(image, for: .normal)
|
|
42
42
|
button.translatesAutoresizingMaskIntoConstraints = false
|
|
43
43
|
return button
|
|
@@ -27,12 +27,10 @@ RCT_EXPORT_METHOD(emitEvent:(NSString *)message) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@end
|
|
30
|
-
|
|
30
|
+
UIViewController *globalAttachTransmitterVC = nil;
|
|
31
31
|
|
|
32
32
|
@implementation CgmTrackyLib
|
|
33
33
|
|
|
34
|
-
//static FinalViewModel *sharedViewModel = nil;
|
|
35
|
-
|
|
36
34
|
RCT_EXPORT_MODULE();
|
|
37
35
|
|
|
38
36
|
// This method returns the list of events the module supports
|
|
@@ -95,14 +93,15 @@ RCT_EXPORT_METHOD(startCgmTracky:(NSString *)token)
|
|
|
95
93
|
});
|
|
96
94
|
}
|
|
97
95
|
|
|
98
|
-
RCT_EXPORT_METHOD(reconnectCgmTracky)
|
|
96
|
+
RCT_EXPORT_METHOD(reconnectCgmTracky:(NSString *)token)
|
|
99
97
|
{
|
|
98
|
+
[[NSUserDefaults standardUserDefaults] setObject:token forKey:@"authToken"];
|
|
99
|
+
[[NSUserDefaults standardUserDefaults] synchronize];
|
|
100
100
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
101
101
|
UIWindow *keyWindow = [UIApplication sharedApplication].delegate.window;
|
|
102
102
|
UIViewController *rootVC = keyWindow.rootViewController;
|
|
103
|
-
|
|
104
103
|
// Load the storyboard
|
|
105
|
-
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainCGM" bundle:
|
|
104
|
+
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainCGM" bundle:[NSBundle mainBundle]];
|
|
106
105
|
|
|
107
106
|
// Instantiate the target ViewController
|
|
108
107
|
UIViewController *reconnectVC = [storyboard instantiateViewControllerWithIdentifier:@"ConnectToTransmitterViewController"];
|
|
@@ -145,14 +144,27 @@ RCT_EXPORT_METHOD(openHelpSupport)
|
|
|
145
144
|
|
|
146
145
|
RCT_EXPORT_METHOD(observeAllGlucoseData:(NSString *)token)
|
|
147
146
|
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
//
|
|
147
|
+
[[NSUserDefaults standardUserDefaults] setObject:token forKey:@"authToken"];
|
|
148
|
+
[[NSUserDefaults standardUserDefaults] synchronize];
|
|
149
|
+
|
|
150
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
151
|
+
UIWindow *keyWindow = [UIApplication sharedApplication].delegate.window;
|
|
152
|
+
UIViewController *rootVC = keyWindow.rootViewController;
|
|
153
|
+
|
|
154
|
+
// Load the storyboard
|
|
155
|
+
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainCGM" bundle:nil];
|
|
156
|
+
|
|
157
|
+
// Instantiate the target ViewController
|
|
158
|
+
globalAttachTransmitterVC = [storyboard instantiateViewControllerWithIdentifier:@"AttachTransmitterViewController"];
|
|
159
|
+
|
|
160
|
+
// Set presentation style
|
|
161
|
+
// chatWithExpertVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
|
162
|
+
|
|
163
|
+
// Present it directly without navigation
|
|
164
|
+
//if (chatWithExpertVC) {
|
|
165
|
+
// [rootVC presentViewController:chatWithExpertVC animated:YES completion:nil];
|
|
166
|
+
// }
|
|
167
|
+
});
|
|
156
168
|
}
|
|
157
169
|
|
|
158
170
|
@end
|