hypertrack-sdk-react-native 9.1.0 → 9.2.0

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 (99) hide show
  1. package/CHANGELOG.md +153 -3
  2. package/README.md +3 -3
  3. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  8. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/7.2/gc.properties +0 -0
  10. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  12. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  13. package/android/.gradle/checksums/checksums.lock +0 -0
  14. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  15. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  16. package/android/.gradle/vcs-1/gc.properties +0 -0
  17. package/android/.idea/compiler.xml +6 -0
  18. package/android/.idea/gradle.xml +19 -0
  19. package/android/.idea/jarRepositories.xml +35 -0
  20. package/android/.idea/kotlinc.xml +6 -0
  21. package/android/.idea/misc.xml +9 -0
  22. package/android/.idea/vcs.xml +6 -0
  23. package/android/local.properties +8 -0
  24. package/android/src/main/java/com/reactnativehypertracksdk/HyperTrackReactNativePlugin.kt +4 -4
  25. package/android/src/main/java/com/reactnativehypertracksdk/ReactNativeSerialization.kt +16 -17
  26. package/android/src/main/java/com/reactnativehypertracksdk/common/GeotagData.kt +13 -0
  27. package/android/src/main/java/com/reactnativehypertracksdk/common/HyperTrackSdkWrapper.kt +45 -19
  28. package/android/src/main/java/com/reactnativehypertracksdk/common/Serialization.kt +115 -40
  29. package/hypertrack-sdk-react-native.podspec +1 -1
  30. package/ios/common/GeotagData.swift +11 -0
  31. package/ios/common/HyperTrackSDKWrapper.swift +9 -4
  32. package/ios/common/Serialization.swift +140 -61
  33. package/lib/commonjs/HyperTrack/HyperTrack.js +90 -22
  34. package/lib/commonjs/HyperTrack/HyperTrack.js.map +1 -1
  35. package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js +4 -4
  36. package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js.map +1 -1
  37. package/lib/commonjs/HyperTrack/data_types/Location.js.map +1 -1
  38. package/lib/commonjs/HyperTrack/data_types/LocationError.js.map +1 -1
  39. package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js +6 -0
  40. package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
  41. package/lib/commonjs/HyperTrack/data_types/Result.js +2 -0
  42. package/lib/commonjs/HyperTrack/data_types/Result.js.map +1 -0
  43. package/lib/commonjs/HyperTrack/data_types/internal/{LocationResponse.js → GeotagData.js} +1 -1
  44. package/lib/commonjs/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
  45. package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js +2 -0
  46. package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
  47. package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +6 -0
  48. package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
  49. package/lib/commonjs/index.js +22 -2
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/module/HyperTrack/HyperTrack.js +90 -22
  52. package/lib/module/HyperTrack/HyperTrack.js.map +1 -1
  53. package/lib/module/HyperTrack/data_types/HyperTrackError.js +3 -3
  54. package/lib/module/HyperTrack/data_types/HyperTrackError.js.map +1 -1
  55. package/lib/module/HyperTrack/data_types/Location.js.map +1 -1
  56. package/lib/module/HyperTrack/data_types/LocationError.js.map +1 -1
  57. package/lib/module/HyperTrack/data_types/LocationWithDeviation.js +2 -0
  58. package/lib/module/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
  59. package/lib/module/HyperTrack/data_types/Result.js +2 -0
  60. package/lib/module/HyperTrack/data_types/Result.js.map +1 -0
  61. package/lib/module/HyperTrack/data_types/internal/GeotagData.js +2 -0
  62. package/lib/module/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
  63. package/lib/module/HyperTrack/data_types/internal/LocationInternal.js +2 -0
  64. package/lib/module/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
  65. package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +2 -0
  66. package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
  67. package/lib/module/index.js +3 -1
  68. package/lib/module/index.js.map +1 -1
  69. package/lib/typescript/HyperTrack/HyperTrack.d.ts +17 -1
  70. package/lib/typescript/HyperTrack/data_types/Location.d.ts +2 -5
  71. package/lib/typescript/HyperTrack/data_types/LocationError.d.ts +0 -1
  72. package/lib/typescript/HyperTrack/data_types/LocationWithDeviation.d.ts +5 -0
  73. package/lib/typescript/HyperTrack/data_types/Result.d.ts +9 -0
  74. package/lib/typescript/HyperTrack/data_types/internal/GeotagData.d.ts +5 -0
  75. package/lib/typescript/HyperTrack/data_types/internal/LocationInternal.d.ts +7 -0
  76. package/lib/typescript/HyperTrack/data_types/internal/LocationWithDeviationInternal.d.ts +8 -0
  77. package/lib/typescript/index.d.ts +3 -1
  78. package/package.json +1 -1
  79. package/src/HyperTrack/HyperTrack.ts +160 -46
  80. package/src/HyperTrack/data_types/Location.ts +2 -5
  81. package/src/HyperTrack/data_types/LocationError.ts +0 -2
  82. package/src/HyperTrack/data_types/LocationWithDeviation.ts +6 -0
  83. package/src/HyperTrack/data_types/Result.ts +11 -0
  84. package/src/HyperTrack/data_types/internal/GeotagData.ts +6 -0
  85. package/src/HyperTrack/data_types/internal/LocationInternal.ts +7 -0
  86. package/src/HyperTrack/data_types/internal/LocationWithDeviationInternal.ts +9 -0
  87. package/src/index.tsx +7 -2
  88. package/android/src/main/java/com/reactnativehypertracksdk/common/Geotag.kt +0 -9
  89. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js +0 -2
  90. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js.map +0 -1
  91. package/lib/commonjs/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
  92. package/lib/module/HyperTrack/data_types/internal/Geotag.js +0 -2
  93. package/lib/module/HyperTrack/data_types/internal/Geotag.js.map +0 -1
  94. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js +0 -2
  95. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
  96. package/lib/typescript/HyperTrack/data_types/internal/Geotag.d.ts +0 -3
  97. package/lib/typescript/HyperTrack/data_types/internal/LocationResponse.d.ts +0 -11
  98. package/src/HyperTrack/data_types/internal/Geotag.ts +0 -3
  99. package/src/HyperTrack/data_types/internal/LocationResponse.ts +0 -14
package/CHANGELOG.md CHANGED
@@ -3,14 +3,32 @@
3
3
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4
4
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [9.2.0] - 2023-05-18
7
+
8
+ ### Added
9
+
10
+ - `addGeotag` with expected location
11
+
12
+ ### Changed
13
+
14
+ - HyperTrack iOS SDK updated to 5.15.0
15
+
16
+ ## [9.1.1] - 2023-03-30
17
+
18
+ ### Fixed
19
+
20
+ - Removed types re-export to fix issues with some build configurations
21
+
6
22
  ## [9.1.0] - 2023-03-21
7
23
 
8
24
  ### Added
25
+
9
26
  - `automaticallyRequestPermissions` param to `initialize()`
10
27
 
11
28
  ## [9.0.0] - 2023-02-17
12
29
 
13
30
  ### Changed
31
+
14
32
  - Updated HyperTrack iOS SDK to 4.14.0
15
33
  - Updated HyperTrack Android SDK to 6.4.0
16
34
  - `createInstance()` renamed to `initialize()`
@@ -21,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
39
  - `LocationError` now has different structure
22
40
 
23
41
  ### Added
42
+
24
43
  - `initialize()` configuration params for
25
44
  - Debug logging
26
45
  - Background location permissions request for Android
@@ -28,169 +47,250 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
28
47
  - `subscribeToAvailability()`
29
48
 
30
49
  ### Removed
50
+
31
51
  - `automaticallyRequestPermissions` param from `initialize()`
32
52
  - `enableDebugLogging()` (use `initialize()` param `loggingEnabled` istead)
33
53
  - `setTripMarker()` (use `addGeotag` instead)
34
54
 
35
55
  ## [8.2.2] - 2022-10-10
56
+
36
57
  ### Fixed
58
+
37
59
  - Deployment target for iOS changed to 11, to comply with native iOS SDK.
38
60
 
39
61
  ## [8.2.1] - 2022-09-27
62
+
40
63
  ### Fixed
64
+
41
65
  - enableDebugLogging() now doesn't cause an infinite loop when called.
42
66
 
43
67
  ## [8.2.0] - 2022-09-23
68
+
44
69
  ### Changed
70
+
45
71
  - Updated Android SDK to 6.3.0 and iOS SDK to 4.13.0
46
72
  - When the Android app is uninstalled completely from the device and then installed back, the device_id will change. This improves the stability of the data coming from the SDK. Now this behavior is the same between Android SDK and iOS SDK.
47
73
  - If the user simulates locations when it's prohibited, the SDK still passes real locations through if there are any.
48
74
  - Decreased the time sensitivity for first location detection. Results in fewer `location_unavailable` outages when tracking starts on Android.
49
75
 
50
76
  ### Fixed
77
+
51
78
  - Now, all logs in Android SDK are disabled by default and can be enabled by enableDebugLogging()
52
79
 
53
80
  ## [8.1.0] - 2022-08-30
81
+
54
82
  ### Changed
83
+
55
84
  - Updated Android SDK to 6.2.2 that is compabible with any native library (React Native C++) and reduces the SDK size too. SDK should now add only 4MB to the compressed app's size, when downloaded from Google Play instead of 17 MB on 8.0.0.
56
85
 
57
86
  ## [8.0.0] - 2022-08-05
87
+
58
88
  ### Added
89
+
59
90
  - New interface for listeners.
60
91
  - Reference documentation.
61
92
  - TypeScript support.
93
+
62
94
  ### Changed
95
+
63
96
  - Updated React Native from 0.63.3 to 0.69.1
64
97
 
65
98
  ## [7.19.1] - 2022-07-27
99
+
66
100
  ### Fixed
101
+
67
102
  - Fixed React Native C++ incompatibility issue with Android SDK 6.2.0
68
103
 
69
104
  ## [7.19.0] - 2022-07-18
105
+
70
106
  ### Changed
107
+
71
108
  - Updated HyperTrack Android SDK to 6.2.0 and iOS SDK to 4.12.4
72
109
 
73
110
  ## [7.18.4] - 2022-06-15
111
+
74
112
  ### Changed
113
+
75
114
  - Updated HyperTrack Android SDK to 6.1.4
76
115
 
77
116
  ## [7.18.3] - 2022-06-15
117
+
78
118
  ### Changed
119
+
79
120
  - Updated HyperTrack Android SDK to 6.1.3
80
121
 
81
122
  ## [7.18.2] - 2022-06-13
123
+
82
124
  ### Changed
125
+
83
126
  - Updated HyperTrack iOS SDK to 4.12.3
84
127
 
85
128
  ## [7.18.1] - 2022-06-10
129
+
86
130
  ### Changed
131
+
87
132
  - Updated HyperTrack iOS SDK to 4.12.1 to fix a regression in tracking listener
88
133
 
89
134
  ## [7.18.0] - 2022-06-09
135
+
90
136
  ### Changed
137
+
91
138
  - Updated HyperTrack Android SDK to 6.1.2 and iOS SDK to 4.12.0
92
139
 
93
140
  ## [7.17.0] - 2022-06-03
141
+
94
142
  ### Changed
143
+
95
144
  - Updated HyperTrack Android SDK to 6.1.1
96
145
 
97
146
  ## [7.16.0] - 2022-05-03
147
+
98
148
  ### Changed
149
+
99
150
  - Updated HyperTrack Android SDK to [6.0.4](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#604---2022-04-29)
100
151
 
101
152
  ## [7.16.0] - 2022-05-03
153
+
102
154
  ### Changed
155
+
103
156
  - Updated HyperTrack Android SDK to [6.0.4](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#604---2022-04-29)
104
157
 
105
158
  ## [7.15.0] - 2022-04-29
159
+
106
160
  ### Added
161
+
107
162
  - Current location getter returns either the current location of the device or an outage reason for why current location is unavailable.
108
163
 
109
164
  ## [7.14.0] - 2022-03-24
165
+
110
166
  ### Changed
167
+
111
168
  - Updated HyperTrack Android SDK to [6.0.2](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#602---2022-03-18)
112
169
 
113
170
  ## [7.13.0] - 2022-01-05
171
+
114
172
  ### Changed
173
+
115
174
  - Updated iOS SDK to [4.9.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#490---2022-01-05)
116
175
 
117
176
  ## [7.12.1] - 2021-11-11
177
+
118
178
  ### Changed
179
+
119
180
  - Updated Android SDK to [5.4.5](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#545---2021-11-05)
120
181
 
121
182
  ## [7.12.0] - 2021-10-29
183
+
122
184
  ### Changed
185
+
123
186
  - Updated Android SDK to [5.4.4](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#544---2021-10-29)
124
187
 
125
188
  ## [7.11.0] - 2021-10-28
189
+
126
190
  ### Changed
191
+
127
192
  - Updated Android SDK to [5.4.3](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#543---2021-09-01)
128
193
 
129
194
  ## [7.10.0] - 2021-08-04
195
+
130
196
  ### Changed
197
+
131
198
  - Updated Android SDK to [5.4.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#540---2021-08-04)
132
199
 
133
200
  ## [7.9.0] - 2021-07-07
201
+
134
202
  ### Changed
203
+
135
204
  - Updated Android SDK to [v5.2.5](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#525---2021-07-02)
136
205
 
137
206
  ## [7.8.1] - 2021-06-11
207
+
138
208
  ### Fixed
209
+
139
210
  - Accidently removed import added back.
140
211
 
141
212
  ## [7.8.0] - 2021-06-11
213
+
142
214
  ### Changed
215
+
143
216
  - Updated Android SDK to [v5.2.2](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#522---2021-06-11)
144
217
 
145
218
  ## [7.7.0] - 2021-05-29
219
+
146
220
  ### Changed
221
+
147
222
  - Updated Android SDK to [v5.1.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#510---2021-05-28)
148
223
 
149
224
  ## [7.6.0] - 2021-05-07
225
+
150
226
  ### Changed
227
+
151
228
  - Updated Android SDK to [v4.12.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4120---2021-05-07)
152
229
 
153
230
  ## [7.5.0] - 2021-04-26
231
+
154
232
  ### Changed
233
+
155
234
  - Updated iOS SDK to [4.8.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#480---2021-04-22)
156
235
  - Updated Android SDK to [v4.11.1](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4111---2021-04-20)
157
236
 
158
237
  ## [7.4.0] - 2021-04-02
238
+
159
239
  ### Changed
240
+
160
241
  - Updated Android SDK to [v4.11.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4110---2021-03-30)
242
+
161
243
  ### Fixed
244
+
162
245
  - SDK won't navigate to Settings showing "Select `Allow Always` option" snackbar on Android 11 and later.
163
246
 
164
247
  ## [7.3.0] - 2021-03-04
248
+
165
249
  ### Changed
250
+
166
251
  - Updated Android SDK to [v4.10.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4100---2021-02-22)
167
252
 
168
253
  ## [7.2.0] - 2020-12-23
254
+
169
255
  ### Changed
256
+
170
257
  - Updated iOS SDK to [v4.7.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#470---2020-12-23)
258
+
171
259
  ### Fixed
260
+
172
261
  - iOS plugin runtime error notification.
173
262
 
174
263
  ## [7.1.0] - 2020-11-17
264
+
175
265
  ### Changed
266
+
176
267
  - Updated Anroid SDK to [v4.8.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#480---2020-10-30)
177
268
  - Updated iOS SDK to [v4.6.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#460---2020-11-09)
178
269
  - Using React-Core on iOS (https://github.com/hypertrack/sdk-react-native/pull/19)
179
270
 
180
271
  ## [7.0.1] - 2020-10-07
272
+
181
273
  ### Fixed
274
+
182
275
  - Added `hypertrack-sdk-react-native.podspec` to `package.json` file.
276
+
183
277
  ### Changed
278
+
184
279
  - Updated iOS SDK to `4.5.1`.
185
280
 
186
281
  ## [7.0.0] - 2020-10-02
282
+
187
283
  ### Changed
284
+
188
285
  - Updated react-native to version `0.63.3`.
189
286
  - Updated Android SDK to `4.6.0`.
287
+
190
288
  ### Removed
289
+
191
290
  - Remove startsTracking API from createInstance.
192
291
 
193
292
  ### API Diff
293
+
194
294
  ```diff
195
295
  /**
196
296
  * Initialize the HyperTrack SDK
@@ -207,28 +307,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
207
307
  ```
208
308
 
209
309
  ## [6.6.0] - 2020-07-24
310
+
210
311
  ### Changed
312
+
211
313
  - Updated react-native to version `0.61.4`.
212
314
  - Updated Android SDK to `4.5.2`.
213
315
 
214
316
  ## [6.5.1] - 2020-07-20
317
+
215
318
  ### Changed
319
+
216
320
  - Updated Android SDK to `4.5.1`.
217
321
 
218
322
  ## [6.5.0] - 2020-07-16
323
+
219
324
  ### Changed
325
+
220
326
  - Updated Android SDK to `4.5.0`.
221
327
 
222
328
  ## [6.4.0] - 2020-07-14
329
+
223
330
  ### Added
331
+
224
332
  - Only send events when there are listeners in iOS wrapper.
333
+
225
334
  ### Changed
335
+
226
336
  - Reject promise properly and with error code during iOS initialization.
337
+
227
338
  ### Fixed
339
+
228
340
  - Fixed regression where syncDeviceSettings was removed from iOS SDK wrapper.
229
341
 
230
342
  ## [6.3.0] - 2020-07-13
343
+
231
344
  ### Changed
345
+
232
346
  - Control permission dialogs on iOS.
233
347
 
234
348
  ### API Diff
@@ -250,57 +364,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
250
364
  ```
251
365
 
252
366
  ## [6.2.2] - 2020-04-14
367
+
253
368
  ### Changed
369
+
254
370
  - Updated Android dependency repos.
255
371
 
256
372
  ## [6.2.1] - 2020-01-08
373
+
257
374
  ### Added
375
+
258
376
  - RN SDK wrapper now supports native iOS `4.0.x` SDK.
259
377
 
260
378
  ## [6.1.0] - 2019-09-30
379
+
261
380
  ### Added
381
+
262
382
  - Adding sync device settings
263
- - Updated Android SDK to `3.4.7`.
383
+ - Updated Android SDK to `3.4.7`.
264
384
 
265
385
  ## [6.0.0] - 2019-09-17
386
+
266
387
  ### Changed
388
+
267
389
  - Updated interface with promises and split name and metadata
268
390
  - Updated react-native to version `0.59.9`.
269
391
 
270
392
  ## [5.0.5] - 2019-08-29
393
+
271
394
  ### Changed
272
- - Updated Android SDK to `3.4.5`.
395
+
396
+ - Updated Android SDK to `3.4.5`.
273
397
 
274
398
  ## [5.0.4] - 2019-08-23
399
+
275
400
  ### Changed
401
+
276
402
  - Updated Android SDK to `3.3.4` and stop tracking events.
277
403
 
278
404
  ## [5.0.3] - 2019-08-22
405
+
279
406
  ### Added
407
+
280
408
  - Make deviceID change with publishable key.
281
409
 
282
410
  ## [5.0.2] - 2019-08-15
411
+
283
412
  ### Fixed
413
+
284
414
  - Fixed Android wrapper permissions handling in initialize and startTracking.
285
415
 
286
416
  ## [5.0.1] - 2019-08-15
417
+
287
418
  ### Added
419
+
288
420
  - Expose critical errors and update the integration.
289
421
 
290
422
  ## [4.1.1] - 2019-08-08
423
+
291
424
  ### Changed
425
+
292
426
  - Bump Android SDK version to `3.3.1`.
293
427
 
294
428
  ## [4.1.0] - 2019-08-07
429
+
295
430
  ### Changed
431
+
296
432
  - Make `getDeviceID` consistent between Android and iOS wrappers.
297
433
 
298
434
  ## [4.0.2] - 2019-08-06
435
+
299
436
  ### Fixed
437
+
300
438
  - Fixed null context exception in Android wrapper.
301
439
 
302
440
  ## [4.0.1] - 2019-07-29
441
+
303
442
  ### Added
443
+
304
444
  - Added an option to start tracking right after initialization.
305
445
 
306
446
  ### API Diff
@@ -318,26 +458,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
318
458
  ```
319
459
 
320
460
  ## [3.0.0] - 2019-07-23
461
+
321
462
  ### Added
463
+
322
464
  - Backups key for Android SDK
465
+
323
466
  ### Changed
467
+
324
468
  - Bump Android SDK version to 3.3.0 and switch to trip markers for native calls.
325
469
 
326
470
  ## [2.0.0] - 2019-07-17
471
+
327
472
  ### Deprecated
473
+
328
474
  - `sendCustomEvent` was renamed to `setTripMarker`.
329
475
 
330
476
  ## [1.0.2] - 2019-07-04
477
+
331
478
  ### Added
479
+
332
480
  - Added silent push notifications.
333
481
 
334
482
  ## [1.0.1] - 2019-06-26
483
+
335
484
  ### Added
485
+
336
486
  - Added HyperTrack repository to repos list.
337
487
 
338
488
  ## [1.0.0] - 2019-06-07
339
- Initial release.
340
489
 
490
+ Initial release.
341
491
 
342
492
  [8.2.2]: https://github.com/hypertrack/sdk-react-native/releases/tag/8.2.2
343
493
  [8.2.1]: https://github.com/hypertrack/sdk-react-native/releases/tag/8.2.1
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # React Native HyperTrack SDK
2
2
 
3
- ![GitHub](https://img.shields.io/github/license/hypertrack/sdk-react-native.svg)
4
- ![npm](https://img.shields.io/npm/v/hypertrack-sdk-react-native.svg)
5
- ![iOS SDK](https://img.shields.io/badge/iOS%20SDK-4.14.0-brightgreen.svg)
3
+ ![GitHub](https://img.shields.io/github/license/hypertrack/sdk-react-native.svg)
4
+ ![npm](https://img.shields.io/npm/v/hypertrack-sdk-react-native.svg)
5
+ ![iOS SDK](https://img.shields.io/badge/iOS%20SDK-4.15.0-brightgreen.svg)
6
6
  ![Android SDK](https://img.shields.io/badge/Android%20SDK-6.4.0-brightgreen.svg)
7
7
 
8
8
  [HyperTrack](https://www.hypertrack.com) lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Apr 13 16:52:30 EEST 2023
2
+ gradle.version=7.2
File without changes
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="CompilerConfiguration">
4
+ <bytecodeTargetLevel target="11" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GradleMigrationSettings" migrationVersion="1" />
4
+ <component name="GradleSettings">
5
+ <option name="linkedExternalProjectsSettings">
6
+ <GradleProjectSettings>
7
+ <option name="testRunner" value="GRADLE" />
8
+ <option name="distributionType" value="DEFAULT_WRAPPED" />
9
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
10
+ <option name="gradleHome" value="/usr/local/Cellar/gradle/8.0.2/libexec" />
11
+ <option name="modules">
12
+ <set>
13
+ <option value="$PROJECT_DIR$" />
14
+ </set>
15
+ </option>
16
+ </GradleProjectSettings>
17
+ </option>
18
+ </component>
19
+ </project>
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="RemoteRepositoriesConfiguration">
4
+ <remote-repository>
5
+ <option name="id" value="central" />
6
+ <option name="name" value="Maven Central repository" />
7
+ <option name="url" value="https://repo1.maven.org/maven2" />
8
+ </remote-repository>
9
+ <remote-repository>
10
+ <option name="id" value="jboss.community" />
11
+ <option name="name" value="JBoss Community repository" />
12
+ <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
13
+ </remote-repository>
14
+ <remote-repository>
15
+ <option name="id" value="MavenRepo" />
16
+ <option name="name" value="MavenRepo" />
17
+ <option name="url" value="https://repo.maven.apache.org/maven2/" />
18
+ </remote-repository>
19
+ <remote-repository>
20
+ <option name="id" value="React Native sources" />
21
+ <option name="name" value="React Native sources" />
22
+ <option name="url" value="file:$PROJECT_DIR$/../node_modules/react-native/android/" />
23
+ </remote-repository>
24
+ <remote-repository>
25
+ <option name="id" value="hypertrack" />
26
+ <option name="name" value="hypertrack" />
27
+ <option name="url" value="https://s3-us-west-2.amazonaws.com/m2.hypertrack.com/" />
28
+ </remote-repository>
29
+ <remote-repository>
30
+ <option name="id" value="Google" />
31
+ <option name="name" value="Google" />
32
+ <option name="url" value="https://dl.google.com/dl/android/maven2/" />
33
+ </remote-repository>
34
+ </component>
35
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="KotlinJpsPluginSettings">
4
+ <option name="version" value="1.7.0" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,9 @@
1
+ <project version="4">
2
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
3
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="zulu-11" project-jdk-type="JavaSDK">
4
+ <output url="file://$PROJECT_DIR$/build/classes" />
5
+ </component>
6
+ <component name="ProjectType">
7
+ <option name="id" value="Android" />
8
+ </component>
9
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ ## This file must *NOT* be checked into Version Control Systems,
2
+ # as it contains information specific to your local configuration.
3
+ #
4
+ # Location of the SDK. This is only used by Gradle.
5
+ # For customization when using a Version Control System, please read the
6
+ # header note.
7
+ #Thu Apr 13 16:52:01 EEST 2023
8
+ sdk.dir=/Users/spqrta/Library/Android/sdk
@@ -4,8 +4,8 @@ import com.facebook.react.bridge.*
4
4
  import com.facebook.react.module.annotations.ReactModule
5
5
  import com.facebook.react.modules.core.DeviceEventManagerModule
6
6
  import com.hypertrack.sdk.*
7
- import com.hypertrack.sdk.TrackingStateObserver.OnTrackingStateChangeListener
8
7
  import com.hypertrack.sdk.AvailabilityStateObserver.OnAvailabilityStateChangeListener
8
+ import com.hypertrack.sdk.TrackingStateObserver.OnTrackingStateChangeListener
9
9
  import com.reactnativehypertracksdk.common.*
10
10
  import com.reactnativehypertracksdk.common.Serialization.serializeIsAvailable
11
11
  import com.reactnativehypertracksdk.common.Serialization.serializeIsTracking
@@ -24,10 +24,10 @@ class HyperTrackReactNativePlugin(reactContext: ReactApplicationContext?) :
24
24
 
25
25
  @ReactMethod
26
26
  fun addListener(type: String?) {
27
- when(type) {
27
+ when (type) {
28
28
  EVENT_TRACKING -> {
29
29
  HyperTrackSdkWrapper.isTracking().let {
30
- when(it) {
30
+ when (it) {
31
31
  is Success -> {
32
32
  emitIsTracking(it.success)
33
33
  }
@@ -39,7 +39,7 @@ class HyperTrackReactNativePlugin(reactContext: ReactApplicationContext?) :
39
39
  }
40
40
  EVENT_AVAILABILITY -> {
41
41
  HyperTrackSdkWrapper.isAvailable().let {
42
- when(it) {
42
+ when (it) {
43
43
  is Success -> {
44
44
  emitIsAvailable(it.success)
45
45
  }
@@ -1,6 +1,5 @@
1
1
  package com.reactnativehypertracksdk
2
2
 
3
- import android.util.Log
4
3
  import com.facebook.react.bridge.Arguments
5
4
  import com.facebook.react.bridge.Promise
6
5
  import com.facebook.react.bridge.WritableArray
@@ -11,25 +10,25 @@ import com.reactnativehypertracksdk.common.Success
11
10
 
12
11
  @Suppress("UNCHECKED_CAST")
13
12
  internal fun <T> Result<T>.toPromise(promise: Promise) {
14
- when(this) {
15
- is Success -> {
16
- when(this.success) {
17
- is Map<*, *> -> {
18
- promise.resolve((this.success as Map<String, Any>).toWritableMap())
19
- }
20
- is Unit -> {
21
- promise.resolve(null)
13
+ when (this) {
14
+ is Success -> {
15
+ when (this.success) {
16
+ is Map<*, *> -> {
17
+ promise.resolve((this.success as Map<String, Any>).toWritableMap())
18
+ }
19
+ is Unit -> {
20
+ promise.resolve(null)
21
+ }
22
+ else -> {
23
+ // using nested exception to correctly display error in RN logs
24
+ promise.reject(Exception(IllegalArgumentException(this.success.toString())))
25
+ }
26
+ }
22
27
  }
23
- else -> {
24
- // using nested exception to correctly display error in RN logs
25
- promise.reject(Exception(IllegalArgumentException(this.success.toString())))
28
+ is Failure -> {
29
+ promise.reject(Exception(this.failure))
26
30
  }
27
- }
28
- }
29
- is Failure -> {
30
- promise.reject(Exception(this.failure))
31
31
  }
32
- }
33
32
  }
34
33
 
35
34
  @Suppress("UNCHECKED_CAST")