@tryvital/vital-health-react-native 1.12.0 → 1.13.1

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.
Files changed (94) hide show
  1. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/AskForPermissionContinuation.dex +0 -0
  2. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$Companion.dex +0 -0
  3. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$cleanUp$1.dex +0 -0
  4. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$1.dex +0 -0
  5. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$job$1.dex +0 -0
  6. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$startStatusUpdate$1.dex +0 -0
  7. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$syncData$1.dex +0 -0
  8. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$writeHealthData$1.dex +0 -0
  9. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModule.dex +0 -0
  10. package/android/build/.transforms/529d28f4829430de90697bcd9f01b753/transformed/release/com/vitalhealthreactnative/VitalHealthReactNativeModuleKt.dex +0 -0
  11. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/AskForPermissionContinuation.dex +0 -0
  12. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$Companion.dex +0 -0
  13. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$cleanUp$1.dex +0 -0
  14. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$1.dex +0 -0
  15. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$job$1.dex +0 -0
  16. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$startStatusUpdate$1.dex +0 -0
  17. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$syncData$1.dex +0 -0
  18. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$writeHealthData$1.dex +0 -0
  19. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule.dex +0 -0
  20. package/android/build/.transforms/7daa840025aa96d88f6824c7b735a441/transformed/debug/com/vitalhealthreactnative/VitalHealthReactNativeModuleKt.dex +0 -0
  21. package/android/build/.transforms/e3790c1093283a76b233286b2e39540a/transformed/out/jars/classes.jar +0 -0
  22. package/android/build/intermediates/aar_main_jar/debug/classes.jar +0 -0
  23. package/android/build/intermediates/aar_main_jar/release/classes.jar +0 -0
  24. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  25. package/android/build/intermediates/compile_library_classes_jar/release/classes.jar +0 -0
  26. package/android/build/intermediates/full_jar/release/full.jar +0 -0
  27. package/android/build/intermediates/local_aar_for_lint/release/out.aar +0 -0
  28. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/AskForPermissionContinuation.class +0 -0
  29. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$Companion.class +0 -0
  30. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$cleanUp$1.class +0 -0
  31. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$1.class +0 -0
  32. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$job$1.class +0 -0
  33. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$startStatusUpdate$1.class +0 -0
  34. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$syncData$1.class +0 -0
  35. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$writeHealthData$1.class +0 -0
  36. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule.class +0 -0
  37. package/android/build/intermediates/runtime_library_classes_dir/debug/com/vitalhealthreactnative/VitalHealthReactNativeModuleKt.class +0 -0
  38. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/AskForPermissionContinuation.class +0 -0
  39. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$Companion.class +0 -0
  40. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$cleanUp$1.class +0 -0
  41. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$1.class +0 -0
  42. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$job$1.class +0 -0
  43. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$startStatusUpdate$1.class +0 -0
  44. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$syncData$1.class +0 -0
  45. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$writeHealthData$1.class +0 -0
  46. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModule.class +0 -0
  47. package/android/build/intermediates/runtime_library_classes_dir/release/com/vitalhealthreactnative/VitalHealthReactNativeModuleKt.class +0 -0
  48. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  49. package/android/build/intermediates/runtime_library_classes_jar/release/classes.jar +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  58. package/android/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  59. package/android/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  60. package/android/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  61. package/android/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  62. package/android/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  63. package/android/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  64. package/android/build/kotlin/compileReleaseKotlin/cacheable/last-build.bin +0 -0
  65. package/android/build/kotlin/compileReleaseKotlin/local-state/build-history.bin +0 -0
  66. package/android/build/outputs/aar/tryvital_vital-health-react-native-debug.aar +0 -0
  67. package/android/build/outputs/aar/tryvital_vital-health-react-native-release.aar +0 -0
  68. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/AskForPermissionContinuation.class +0 -0
  69. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$Companion.class +0 -0
  70. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$cleanUp$1.class +0 -0
  71. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$1.class +0 -0
  72. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$job$1.class +0 -0
  73. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$startStatusUpdate$1.class +0 -0
  74. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$syncData$1.class +0 -0
  75. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule$writeHealthData$1.class +0 -0
  76. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModule.class +0 -0
  77. package/android/build/tmp/kotlin-classes/debug/com/vitalhealthreactnative/VitalHealthReactNativeModuleKt.class +0 -0
  78. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/AskForPermissionContinuation.class +0 -0
  79. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$Companion.class +0 -0
  80. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$cleanUp$1.class +0 -0
  81. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$1.class +0 -0
  82. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$onActivityResult$job$1.class +0 -0
  83. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$startStatusUpdate$1.class +0 -0
  84. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$syncData$1.class +0 -0
  85. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule$writeHealthData$1.class +0 -0
  86. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModule.class +0 -0
  87. package/android/build/tmp/kotlin-classes/release/com/vitalhealthreactnative/VitalHealthReactNativeModuleKt.class +0 -0
  88. package/android/build.gradle +1 -1
  89. package/android/src/main/java/com/vitalhealthreactnative/VitalHealthReactNativeModule.kt +6 -3
  90. package/lib/commonjs/health_config.js +1 -1
  91. package/lib/module/health_config.js +1 -1
  92. package/package.json +1 -1
  93. package/src/health_config.ts +1 -1
  94. package/vital-health-react-native.podspec +1 -1
@@ -130,7 +130,7 @@ repositories {
130
130
  }
131
131
 
132
132
  def kotlin_version = getExtOrDefault('kotlinVersion')
133
- def vital_sdk_version = '1.0.0-beta.18'
133
+ def vital_sdk_version = '1.0.0-beta.21'
134
134
  def health_connect_version = '1.0.0-alpha11'
135
135
 
136
136
  dependencies {
@@ -111,7 +111,7 @@ class VitalHealthReactNativeModule(reactContext: ReactApplicationContext) :
111
111
  promise: Promise
112
112
  ) {
113
113
  val manager = vitalHealthConnectManager ?: return promise.rejectHealthNotConfigured()
114
- if (askForPermission != null) {
114
+ if (synchronized(this) { this.askForPermission != null }) {
115
115
  return promise.reject(
116
116
  VITAL_HEALTH_ERROR,
117
117
  "Another ask for permission call is already in progress."
@@ -140,7 +140,9 @@ class VitalHealthReactNativeModule(reactContext: ReactApplicationContext) :
140
140
  readResources = read, writeResources = write
141
141
  )
142
142
 
143
- askForPermission = AskForPermissionContinuation(contract, promise)
143
+ synchronized(this) {
144
+ askForPermission = AskForPermissionContinuation(contract, promise)
145
+ }
144
146
 
145
147
  val intent = contract.createIntent(reactApplicationContext, Unit)
146
148
  activity.startActivityForResult(intent, VITAL_REQUEST_CODE)
@@ -301,7 +303,7 @@ class VitalHealthReactNativeModule(reactContext: ReactApplicationContext) :
301
303
  // p1: request code
302
304
  // p2: result code
303
305
  if (p1 == VITAL_REQUEST_CODE) {
304
- val continuation = askForPermission ?: return
306
+ val continuation = synchronized(this) { askForPermission } ?: return
305
307
 
306
308
  val resultAsync = continuation.contract.parseResult(p2, p3)
307
309
  val job = mainScope.launch {
@@ -312,6 +314,7 @@ class VitalHealthReactNativeModule(reactContext: ReactApplicationContext) :
312
314
  if (it != null) {
313
315
  continuation.promise.reject(VITAL_HEALTH_ERROR, "ask for permission has encountered an error", it)
314
316
  }
317
+ synchronized(this) { this.askForPermission = null }
315
318
  }
316
319
  }
317
320
  }
@@ -10,7 +10,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
10
10
  class HealthConfig {
11
11
  constructor() {
12
12
  _defineProperty(this, "logsEnabled", true);
13
- _defineProperty(this, "numberOfDaysToBackFill", 90);
13
+ _defineProperty(this, "numberOfDaysToBackFill", 30);
14
14
  _defineProperty(this, "androidConfig", new AndroidHealthConfig());
15
15
  _defineProperty(this, "iOSConfig", new IOSHealthConfig());
16
16
  }
@@ -4,7 +4,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
4
4
  export class HealthConfig {
5
5
  constructor() {
6
6
  _defineProperty(this, "logsEnabled", true);
7
- _defineProperty(this, "numberOfDaysToBackFill", 90);
7
+ _defineProperty(this, "numberOfDaysToBackFill", 30);
8
8
  _defineProperty(this, "androidConfig", new AndroidHealthConfig());
9
9
  _defineProperty(this, "iOSConfig", new IOSHealthConfig());
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-health-react-native",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "description": "Client to access iOS's HealthKit and Android HealthConnect",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -1,6 +1,6 @@
1
1
  export class HealthConfig {
2
2
  logsEnabled = true;
3
- numberOfDaysToBackFill = 90;
3
+ numberOfDaysToBackFill = 30;
4
4
  androidConfig = new AndroidHealthConfig();
5
5
  iOSConfig = new IOSHealthConfig();
6
6
  }
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "VitalHealthKit", "~> 0.10.1"
20
+ s.dependency "VitalHealthKit", "~> 0.10.6"
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then