react-native-mytatva-rn-sdk 1.2.92 → 1.2.93

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.
@@ -62,6 +62,10 @@ class PlaceTransmitterActivity : AppCompatActivity() {
62
62
  binding.commonButton.tvProceed.text = "Complete"
63
63
 
64
64
  binding.commonButton.btnProceed.setOnClickListener {
65
+ sendDataToRN(
66
+ "{\"screen\":\"PlaceTransmitter\",\"step\":5}",
67
+ "CGM_PLACE_TRANSMITTER_COMPLETE_CLICKED"
68
+ )
65
69
  sendDataToRN("", "cgm_connection_complete_clicked")
66
70
  sendDataToRN("", "WARM_PERIOD_STARTED")
67
71
  finish()
@@ -365,7 +365,19 @@ RCT_EXPORT_MODULE();
365
365
  NSString *name = notification.name;
366
366
 
367
367
  if ([name isEqualToString:@"cgmDeviceEvent"]) {
368
- [self sendEventWithName:@"cgmDeviceEvent" body:@{@"status": @"WARM_PERIOD_STARTED"}];
368
+ NSDictionary *userInfo = notification.userInfo;
369
+ NSString *status = userInfo[@"status"];
370
+ NSString *data = userInfo[@"data"];
371
+
372
+ if (status != nil) {
373
+ NSMutableDictionary *body = [NSMutableDictionary dictionaryWithObject:status forKey:@"status"];
374
+ if (data != nil) {
375
+ body[@"data"] = data;
376
+ }
377
+ [self sendEventWithName:@"cgmDeviceEvent" body:body];
378
+ } else {
379
+ [self sendEventWithName:@"cgmDeviceEvent" body:@{@"status": @"WARM_PERIOD_STARTED"}];
380
+ }
369
381
  }
370
382
  else if ([name isEqualToString:@"cgmwatchdemoclicked"]) {
371
383
  [self sendEventWithName:@"cgmwatchdemoclicked" body:@{@"status": @"cgm_watch_demo_clicked"}];
@@ -57,6 +57,15 @@ class AttachTransmitterViewController: UIViewController {
57
57
 
58
58
  bottomButton.labelText = "Complete"
59
59
  bottomButton.buttonTapCallback = {
60
+ NotificationCenter.default.post(
61
+ name: Notification.Name("cgmDeviceEvent"),
62
+ object: nil,
63
+ userInfo: [
64
+ "data": "{\"screen\":\"PlaceTransmitter\",\"step\":5}",
65
+ "status": "CGM_PLACE_TRANSMITTER_COMPLETE_CLICKED",
66
+ ]
67
+ )
68
+
60
69
  let payload = [
61
70
  "status": "cgm_connection_complete_clicked",
62
71
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.92",
3
+ "version": "1.2.93",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",