hypertrack-sdk-react-native 9.1.1 → 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 (95) hide show
  1. package/CHANGELOG.md +148 -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/LocationWithDeviation.js +6 -0
  39. package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
  40. package/lib/commonjs/HyperTrack/data_types/Result.js +2 -0
  41. package/lib/commonjs/HyperTrack/data_types/Result.js.map +1 -0
  42. package/lib/commonjs/HyperTrack/data_types/internal/{LocationResponse.js → GeotagData.js} +1 -1
  43. package/lib/commonjs/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
  44. package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js +2 -0
  45. package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
  46. package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +6 -0
  47. package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
  48. package/lib/commonjs/index.js +19 -0
  49. package/lib/commonjs/index.js.map +1 -1
  50. package/lib/module/HyperTrack/HyperTrack.js +90 -22
  51. package/lib/module/HyperTrack/HyperTrack.js.map +1 -1
  52. package/lib/module/HyperTrack/data_types/HyperTrackError.js +3 -3
  53. package/lib/module/HyperTrack/data_types/HyperTrackError.js.map +1 -1
  54. package/lib/module/HyperTrack/data_types/Location.js.map +1 -1
  55. package/lib/module/HyperTrack/data_types/LocationWithDeviation.js +2 -0
  56. package/lib/module/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
  57. package/lib/module/HyperTrack/data_types/Result.js +2 -0
  58. package/lib/module/HyperTrack/data_types/Result.js.map +1 -0
  59. package/lib/module/HyperTrack/data_types/internal/GeotagData.js +2 -0
  60. package/lib/module/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
  61. package/lib/module/HyperTrack/data_types/internal/LocationInternal.js +2 -0
  62. package/lib/module/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
  63. package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +2 -0
  64. package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
  65. package/lib/module/index.js +1 -0
  66. package/lib/module/index.js.map +1 -1
  67. package/lib/typescript/HyperTrack/HyperTrack.d.ts +17 -1
  68. package/lib/typescript/HyperTrack/data_types/Location.d.ts +2 -5
  69. package/lib/typescript/HyperTrack/data_types/LocationWithDeviation.d.ts +5 -0
  70. package/lib/typescript/HyperTrack/data_types/Result.d.ts +9 -0
  71. package/lib/typescript/HyperTrack/data_types/internal/GeotagData.d.ts +5 -0
  72. package/lib/typescript/HyperTrack/data_types/internal/LocationInternal.d.ts +7 -0
  73. package/lib/typescript/HyperTrack/data_types/internal/LocationWithDeviationInternal.d.ts +8 -0
  74. package/lib/typescript/index.d.ts +2 -1
  75. package/package.json +1 -1
  76. package/src/HyperTrack/HyperTrack.ts +160 -46
  77. package/src/HyperTrack/data_types/Location.ts +2 -5
  78. package/src/HyperTrack/data_types/LocationWithDeviation.ts +6 -0
  79. package/src/HyperTrack/data_types/Result.ts +11 -0
  80. package/src/HyperTrack/data_types/internal/GeotagData.ts +6 -0
  81. package/src/HyperTrack/data_types/internal/LocationInternal.ts +7 -0
  82. package/src/HyperTrack/data_types/internal/LocationWithDeviationInternal.ts +9 -0
  83. package/src/index.tsx +6 -2
  84. package/android/src/main/java/com/reactnativehypertracksdk/common/Geotag.kt +0 -9
  85. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js +0 -2
  86. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js.map +0 -1
  87. package/lib/commonjs/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
  88. package/lib/module/HyperTrack/data_types/internal/Geotag.js +0 -2
  89. package/lib/module/HyperTrack/data_types/internal/Geotag.js.map +0 -1
  90. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js +0 -2
  91. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
  92. package/lib/typescript/HyperTrack/data_types/internal/Geotag.d.ts +0 -3
  93. package/lib/typescript/HyperTrack/data_types/internal/LocationResponse.d.ts +0 -11
  94. package/src/HyperTrack/data_types/internal/Geotag.ts +0 -3
  95. package/src/HyperTrack/data_types/internal/LocationResponse.ts +0 -14
package/CHANGELOG.md CHANGED
@@ -3,19 +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
+
6
16
  ## [9.1.1] - 2023-03-30
7
17
 
8
18
  ### Fixed
19
+
9
20
  - Removed types re-export to fix issues with some build configurations
10
21
 
11
22
  ## [9.1.0] - 2023-03-21
12
23
 
13
24
  ### Added
25
+
14
26
  - `automaticallyRequestPermissions` param to `initialize()`
15
27
 
16
28
  ## [9.0.0] - 2023-02-17
17
29
 
18
30
  ### Changed
31
+
19
32
  - Updated HyperTrack iOS SDK to 4.14.0
20
33
  - Updated HyperTrack Android SDK to 6.4.0
21
34
  - `createInstance()` renamed to `initialize()`
@@ -26,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
39
  - `LocationError` now has different structure
27
40
 
28
41
  ### Added
42
+
29
43
  - `initialize()` configuration params for
30
44
  - Debug logging
31
45
  - Background location permissions request for Android
@@ -33,169 +47,250 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
33
47
  - `subscribeToAvailability()`
34
48
 
35
49
  ### Removed
50
+
36
51
  - `automaticallyRequestPermissions` param from `initialize()`
37
52
  - `enableDebugLogging()` (use `initialize()` param `loggingEnabled` istead)
38
53
  - `setTripMarker()` (use `addGeotag` instead)
39
54
 
40
55
  ## [8.2.2] - 2022-10-10
56
+
41
57
  ### Fixed
58
+
42
59
  - Deployment target for iOS changed to 11, to comply with native iOS SDK.
43
60
 
44
61
  ## [8.2.1] - 2022-09-27
62
+
45
63
  ### Fixed
64
+
46
65
  - enableDebugLogging() now doesn't cause an infinite loop when called.
47
66
 
48
67
  ## [8.2.0] - 2022-09-23
68
+
49
69
  ### Changed
70
+
50
71
  - Updated Android SDK to 6.3.0 and iOS SDK to 4.13.0
51
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.
52
73
  - If the user simulates locations when it's prohibited, the SDK still passes real locations through if there are any.
53
74
  - Decreased the time sensitivity for first location detection. Results in fewer `location_unavailable` outages when tracking starts on Android.
54
75
 
55
76
  ### Fixed
77
+
56
78
  - Now, all logs in Android SDK are disabled by default and can be enabled by enableDebugLogging()
57
79
 
58
80
  ## [8.1.0] - 2022-08-30
81
+
59
82
  ### Changed
83
+
60
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.
61
85
 
62
86
  ## [8.0.0] - 2022-08-05
87
+
63
88
  ### Added
89
+
64
90
  - New interface for listeners.
65
91
  - Reference documentation.
66
92
  - TypeScript support.
93
+
67
94
  ### Changed
95
+
68
96
  - Updated React Native from 0.63.3 to 0.69.1
69
97
 
70
98
  ## [7.19.1] - 2022-07-27
99
+
71
100
  ### Fixed
101
+
72
102
  - Fixed React Native C++ incompatibility issue with Android SDK 6.2.0
73
103
 
74
104
  ## [7.19.0] - 2022-07-18
105
+
75
106
  ### Changed
107
+
76
108
  - Updated HyperTrack Android SDK to 6.2.0 and iOS SDK to 4.12.4
77
109
 
78
110
  ## [7.18.4] - 2022-06-15
111
+
79
112
  ### Changed
113
+
80
114
  - Updated HyperTrack Android SDK to 6.1.4
81
115
 
82
116
  ## [7.18.3] - 2022-06-15
117
+
83
118
  ### Changed
119
+
84
120
  - Updated HyperTrack Android SDK to 6.1.3
85
121
 
86
122
  ## [7.18.2] - 2022-06-13
123
+
87
124
  ### Changed
125
+
88
126
  - Updated HyperTrack iOS SDK to 4.12.3
89
127
 
90
128
  ## [7.18.1] - 2022-06-10
129
+
91
130
  ### Changed
131
+
92
132
  - Updated HyperTrack iOS SDK to 4.12.1 to fix a regression in tracking listener
93
133
 
94
134
  ## [7.18.0] - 2022-06-09
135
+
95
136
  ### Changed
137
+
96
138
  - Updated HyperTrack Android SDK to 6.1.2 and iOS SDK to 4.12.0
97
139
 
98
140
  ## [7.17.0] - 2022-06-03
141
+
99
142
  ### Changed
143
+
100
144
  - Updated HyperTrack Android SDK to 6.1.1
101
145
 
102
146
  ## [7.16.0] - 2022-05-03
147
+
103
148
  ### Changed
149
+
104
150
  - Updated HyperTrack Android SDK to [6.0.4](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#604---2022-04-29)
105
151
 
106
152
  ## [7.16.0] - 2022-05-03
153
+
107
154
  ### Changed
155
+
108
156
  - Updated HyperTrack Android SDK to [6.0.4](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#604---2022-04-29)
109
157
 
110
158
  ## [7.15.0] - 2022-04-29
159
+
111
160
  ### Added
161
+
112
162
  - Current location getter returns either the current location of the device or an outage reason for why current location is unavailable.
113
163
 
114
164
  ## [7.14.0] - 2022-03-24
165
+
115
166
  ### Changed
167
+
116
168
  - Updated HyperTrack Android SDK to [6.0.2](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#602---2022-03-18)
117
169
 
118
170
  ## [7.13.0] - 2022-01-05
171
+
119
172
  ### Changed
173
+
120
174
  - Updated iOS SDK to [4.9.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#490---2022-01-05)
121
175
 
122
176
  ## [7.12.1] - 2021-11-11
177
+
123
178
  ### Changed
179
+
124
180
  - Updated Android SDK to [5.4.5](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#545---2021-11-05)
125
181
 
126
182
  ## [7.12.0] - 2021-10-29
183
+
127
184
  ### Changed
185
+
128
186
  - Updated Android SDK to [5.4.4](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#544---2021-10-29)
129
187
 
130
188
  ## [7.11.0] - 2021-10-28
189
+
131
190
  ### Changed
191
+
132
192
  - Updated Android SDK to [5.4.3](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#543---2021-09-01)
133
193
 
134
194
  ## [7.10.0] - 2021-08-04
195
+
135
196
  ### Changed
197
+
136
198
  - Updated Android SDK to [5.4.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#540---2021-08-04)
137
199
 
138
200
  ## [7.9.0] - 2021-07-07
201
+
139
202
  ### Changed
203
+
140
204
  - Updated Android SDK to [v5.2.5](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#525---2021-07-02)
141
205
 
142
206
  ## [7.8.1] - 2021-06-11
207
+
143
208
  ### Fixed
209
+
144
210
  - Accidently removed import added back.
145
211
 
146
212
  ## [7.8.0] - 2021-06-11
213
+
147
214
  ### Changed
215
+
148
216
  - Updated Android SDK to [v5.2.2](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#522---2021-06-11)
149
217
 
150
218
  ## [7.7.0] - 2021-05-29
219
+
151
220
  ### Changed
221
+
152
222
  - Updated Android SDK to [v5.1.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#510---2021-05-28)
153
223
 
154
224
  ## [7.6.0] - 2021-05-07
225
+
155
226
  ### Changed
227
+
156
228
  - Updated Android SDK to [v4.12.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4120---2021-05-07)
157
229
 
158
230
  ## [7.5.0] - 2021-04-26
231
+
159
232
  ### Changed
233
+
160
234
  - Updated iOS SDK to [4.8.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#480---2021-04-22)
161
235
  - Updated Android SDK to [v4.11.1](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4111---2021-04-20)
162
236
 
163
237
  ## [7.4.0] - 2021-04-02
238
+
164
239
  ### Changed
240
+
165
241
  - Updated Android SDK to [v4.11.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4110---2021-03-30)
242
+
166
243
  ### Fixed
244
+
167
245
  - SDK won't navigate to Settings showing "Select `Allow Always` option" snackbar on Android 11 and later.
168
246
 
169
247
  ## [7.3.0] - 2021-03-04
248
+
170
249
  ### Changed
250
+
171
251
  - Updated Android SDK to [v4.10.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#4100---2021-02-22)
172
252
 
173
253
  ## [7.2.0] - 2020-12-23
254
+
174
255
  ### Changed
256
+
175
257
  - Updated iOS SDK to [v4.7.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#470---2020-12-23)
258
+
176
259
  ### Fixed
260
+
177
261
  - iOS plugin runtime error notification.
178
262
 
179
263
  ## [7.1.0] - 2020-11-17
264
+
180
265
  ### Changed
266
+
181
267
  - Updated Anroid SDK to [v4.8.0](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#480---2020-10-30)
182
268
  - Updated iOS SDK to [v4.6.0](https://github.com/hypertrack/sdk-ios/blob/master/CHANGELOG.md#460---2020-11-09)
183
269
  - Using React-Core on iOS (https://github.com/hypertrack/sdk-react-native/pull/19)
184
270
 
185
271
  ## [7.0.1] - 2020-10-07
272
+
186
273
  ### Fixed
274
+
187
275
  - Added `hypertrack-sdk-react-native.podspec` to `package.json` file.
276
+
188
277
  ### Changed
278
+
189
279
  - Updated iOS SDK to `4.5.1`.
190
280
 
191
281
  ## [7.0.0] - 2020-10-02
282
+
192
283
  ### Changed
284
+
193
285
  - Updated react-native to version `0.63.3`.
194
286
  - Updated Android SDK to `4.6.0`.
287
+
195
288
  ### Removed
289
+
196
290
  - Remove startsTracking API from createInstance.
197
291
 
198
292
  ### API Diff
293
+
199
294
  ```diff
200
295
  /**
201
296
  * Initialize the HyperTrack SDK
@@ -212,28 +307,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
212
307
  ```
213
308
 
214
309
  ## [6.6.0] - 2020-07-24
310
+
215
311
  ### Changed
312
+
216
313
  - Updated react-native to version `0.61.4`.
217
314
  - Updated Android SDK to `4.5.2`.
218
315
 
219
316
  ## [6.5.1] - 2020-07-20
317
+
220
318
  ### Changed
319
+
221
320
  - Updated Android SDK to `4.5.1`.
222
321
 
223
322
  ## [6.5.0] - 2020-07-16
323
+
224
324
  ### Changed
325
+
225
326
  - Updated Android SDK to `4.5.0`.
226
327
 
227
328
  ## [6.4.0] - 2020-07-14
329
+
228
330
  ### Added
331
+
229
332
  - Only send events when there are listeners in iOS wrapper.
333
+
230
334
  ### Changed
335
+
231
336
  - Reject promise properly and with error code during iOS initialization.
337
+
232
338
  ### Fixed
339
+
233
340
  - Fixed regression where syncDeviceSettings was removed from iOS SDK wrapper.
234
341
 
235
342
  ## [6.3.0] - 2020-07-13
343
+
236
344
  ### Changed
345
+
237
346
  - Control permission dialogs on iOS.
238
347
 
239
348
  ### API Diff
@@ -255,57 +364,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
255
364
  ```
256
365
 
257
366
  ## [6.2.2] - 2020-04-14
367
+
258
368
  ### Changed
369
+
259
370
  - Updated Android dependency repos.
260
371
 
261
372
  ## [6.2.1] - 2020-01-08
373
+
262
374
  ### Added
375
+
263
376
  - RN SDK wrapper now supports native iOS `4.0.x` SDK.
264
377
 
265
378
  ## [6.1.0] - 2019-09-30
379
+
266
380
  ### Added
381
+
267
382
  - Adding sync device settings
268
- - Updated Android SDK to `3.4.7`.
383
+ - Updated Android SDK to `3.4.7`.
269
384
 
270
385
  ## [6.0.0] - 2019-09-17
386
+
271
387
  ### Changed
388
+
272
389
  - Updated interface with promises and split name and metadata
273
390
  - Updated react-native to version `0.59.9`.
274
391
 
275
392
  ## [5.0.5] - 2019-08-29
393
+
276
394
  ### Changed
277
- - Updated Android SDK to `3.4.5`.
395
+
396
+ - Updated Android SDK to `3.4.5`.
278
397
 
279
398
  ## [5.0.4] - 2019-08-23
399
+
280
400
  ### Changed
401
+
281
402
  - Updated Android SDK to `3.3.4` and stop tracking events.
282
403
 
283
404
  ## [5.0.3] - 2019-08-22
405
+
284
406
  ### Added
407
+
285
408
  - Make deviceID change with publishable key.
286
409
 
287
410
  ## [5.0.2] - 2019-08-15
411
+
288
412
  ### Fixed
413
+
289
414
  - Fixed Android wrapper permissions handling in initialize and startTracking.
290
415
 
291
416
  ## [5.0.1] - 2019-08-15
417
+
292
418
  ### Added
419
+
293
420
  - Expose critical errors and update the integration.
294
421
 
295
422
  ## [4.1.1] - 2019-08-08
423
+
296
424
  ### Changed
425
+
297
426
  - Bump Android SDK version to `3.3.1`.
298
427
 
299
428
  ## [4.1.0] - 2019-08-07
429
+
300
430
  ### Changed
431
+
301
432
  - Make `getDeviceID` consistent between Android and iOS wrappers.
302
433
 
303
434
  ## [4.0.2] - 2019-08-06
435
+
304
436
  ### Fixed
437
+
305
438
  - Fixed null context exception in Android wrapper.
306
439
 
307
440
  ## [4.0.1] - 2019-07-29
441
+
308
442
  ### Added
443
+
309
444
  - Added an option to start tracking right after initialization.
310
445
 
311
446
  ### API Diff
@@ -323,26 +458,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
323
458
  ```
324
459
 
325
460
  ## [3.0.0] - 2019-07-23
461
+
326
462
  ### Added
463
+
327
464
  - Backups key for Android SDK
465
+
328
466
  ### Changed
467
+
329
468
  - Bump Android SDK version to 3.3.0 and switch to trip markers for native calls.
330
469
 
331
470
  ## [2.0.0] - 2019-07-17
471
+
332
472
  ### Deprecated
473
+
333
474
  - `sendCustomEvent` was renamed to `setTripMarker`.
334
475
 
335
476
  ## [1.0.2] - 2019-07-04
477
+
336
478
  ### Added
479
+
337
480
  - Added silent push notifications.
338
481
 
339
482
  ## [1.0.1] - 2019-06-26
483
+
340
484
  ### Added
485
+
341
486
  - Added HyperTrack repository to repos list.
342
487
 
343
488
  ## [1.0.0] - 2019-06-07
344
- Initial release.
345
489
 
490
+ Initial release.
346
491
 
347
492
  [8.2.2]: https://github.com/hypertrack/sdk-react-native/releases/tag/8.2.2
348
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")