react-native-nitro-geolocation 1.2.6 → 1.3.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 (223) hide show
  1. package/README.md +61 -272
  2. package/android/build.gradle +1 -0
  3. package/android/src/main/AndroidManifest.xml +39 -0
  4. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidFusedLocationProvider.kt +310 -0
  5. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidFusedRequestFactory.kt +31 -0
  6. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationConversions.kt +71 -0
  7. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationErrors.kt +85 -0
  8. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationOptions.kt +92 -0
  9. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidLocationSettings.kt +3 -0
  10. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidProviderRoute.kt +74 -0
  11. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroBackgroundLocation.kt +132 -0
  12. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocation.kt +219 -476
  13. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundHttpSync.kt +134 -0
  14. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundPermissions.kt +196 -0
  15. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundSerialization.kt +266 -0
  16. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroActivityRecognitionReceiver.kt +13 -0
  17. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundEventHub.kt +65 -0
  18. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundHeadlessTaskService.kt +58 -0
  19. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundLocationController.kt +711 -0
  20. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundLocationService.kt +48 -0
  21. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundNotificationFactory.kt +37 -0
  22. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundStore.kt +655 -0
  23. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBootReceiver.kt +26 -0
  24. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroGeofenceReceiver.kt +14 -0
  25. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroLocationUpdateReceiver.kt +37 -0
  26. package/android/src/test/java/com/margelo/nitro/nitrogeolocation/AndroidFusedLocationProviderTest.kt +64 -0
  27. package/android/src/test/java/com/margelo/nitro/nitrogeolocation/AndroidProviderRouteTest.kt +116 -0
  28. package/ios/IOSBackgroundHttpSync.swift +126 -0
  29. package/ios/IOSBackgroundLocationDelegate.swift +36 -0
  30. package/ios/IOSBackgroundMotion.swift +55 -0
  31. package/ios/IOSBackgroundSerialization.swift +539 -0
  32. package/ios/IOSGeolocationConversions.swift +131 -0
  33. package/ios/IOSGeolocationDelegate.swift +31 -0
  34. package/ios/IOSGeolocationErrors.swift +39 -0
  35. package/ios/IOSGeolocationOptions.swift +135 -0
  36. package/ios/NitroBackgroundLocation.swift +849 -0
  37. package/ios/NitroGeolocation.swift +14 -347
  38. package/nitrogen/generated/android/c++/JActivityRecognitionOptions.hpp +69 -0
  39. package/nitrogen/generated/android/c++/JAndroidBackgroundLocationOptions.hpp +74 -0
  40. package/nitrogen/generated/android/c++/JAndroidBackgroundLocationStatus.hpp +67 -0
  41. package/nitrogen/generated/android/c++/JAndroidBackgroundProvider.hpp +61 -0
  42. package/nitrogen/generated/android/c++/JAndroidForegroundServiceOptions.hpp +90 -0
  43. package/nitrogen/generated/android/c++/JBackgroundEventEnvelope.hpp +129 -0
  44. package/nitrogen/generated/android/c++/JBackgroundEventType.hpp +70 -0
  45. package/nitrogen/generated/android/c++/JBackgroundHttpMethod.hpp +61 -0
  46. package/nitrogen/generated/android/c++/JBackgroundHttpSyncOptions.hpp +131 -0
  47. package/nitrogen/generated/android/c++/JBackgroundHttpSyncResult.hpp +111 -0
  48. package/nitrogen/generated/android/c++/JBackgroundLocation.hpp +110 -0
  49. package/nitrogen/generated/android/c++/JBackgroundLocationOptions.hpp +162 -0
  50. package/nitrogen/generated/android/c++/JBackgroundLocationSource.hpp +73 -0
  51. package/nitrogen/generated/android/c++/JBackgroundLocationState.hpp +70 -0
  52. package/nitrogen/generated/android/c++/JBackgroundLocationStatus.hpp +126 -0
  53. package/nitrogen/generated/android/c++/JBackgroundPermissionResult.hpp +79 -0
  54. package/nitrogen/generated/android/c++/JBackgroundPermissionStatus.hpp +64 -0
  55. package/nitrogen/generated/android/c++/JBackgroundTrackingMode.hpp +61 -0
  56. package/nitrogen/generated/android/c++/JBatterySnapshot.hpp +61 -0
  57. package/nitrogen/generated/android/c++/JDetectedActivity.hpp +66 -0
  58. package/nitrogen/generated/android/c++/JDetectedActivityType.hpp +76 -0
  59. package/nitrogen/generated/android/c++/JFunc_void_BackgroundEventEnvelope.hpp +114 -0
  60. package/nitrogen/generated/android/c++/JFunc_void_BackgroundLocation.hpp +95 -0
  61. package/nitrogen/generated/android/c++/JGeofenceEvent.hpp +94 -0
  62. package/nitrogen/generated/android/c++/JGeofenceRegion.hpp +112 -0
  63. package/nitrogen/generated/android/c++/JGeofenceTransition.hpp +61 -0
  64. package/nitrogen/generated/android/c++/JGeofencingOptions.hpp +82 -0
  65. package/nitrogen/generated/android/c++/JGetStoredBackgroundEventsOptions.hpp +90 -0
  66. package/nitrogen/generated/android/c++/JGetStoredBackgroundLocationsOptions.hpp +69 -0
  67. package/nitrogen/generated/android/c++/JHybridNitroBackgroundLocationSpec.cpp +662 -0
  68. package/nitrogen/generated/android/c++/JHybridNitroBackgroundLocationSpec.hpp +89 -0
  69. package/nitrogen/generated/android/c++/JIOSBackgroundActivityType.hpp +67 -0
  70. package/nitrogen/generated/android/c++/JIOSBackgroundLocationOptions.hpp +79 -0
  71. package/nitrogen/generated/android/c++/JIOSBackgroundLocationStatus.hpp +61 -0
  72. package/nitrogen/generated/android/c++/JLocationProviderStatus.hpp +5 -1
  73. package/nitrogen/generated/android/c++/JStoredBackgroundEventEnvelope.hpp +115 -0
  74. package/nitrogen/generated/android/c++/JStoredBackgroundLocation.hpp +122 -0
  75. package/nitrogen/generated/android/c++/JVariant_NullType_Boolean_String_Double.cpp +34 -0
  76. package/nitrogen/generated/android/c++/JVariant_NullType_Boolean_String_Double.hpp +100 -0
  77. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ActivityRecognitionOptions.kt +66 -0
  78. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundLocationOptions.kt +66 -0
  79. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundLocationStatus.kt +61 -0
  80. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundProvider.kt +24 -0
  81. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidForegroundServiceOptions.kt +91 -0
  82. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventEnvelope.kt +96 -0
  83. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventType.kt +27 -0
  84. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpMethod.kt +24 -0
  85. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpSyncOptions.kt +101 -0
  86. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpSyncResult.kt +71 -0
  87. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocation.kt +96 -0
  88. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationOptions.kt +136 -0
  89. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationSource.kt +28 -0
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationState.kt +27 -0
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationStatus.kt +116 -0
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundPermissionResult.kt +71 -0
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundPermissionStatus.kt +25 -0
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundTrackingMode.kt +24 -0
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BatterySnapshot.kt +56 -0
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/DetectedActivity.kt +61 -0
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/DetectedActivityType.kt +29 -0
  98. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_BackgroundEventEnvelope.kt +80 -0
  99. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_BackgroundLocation.kt +80 -0
  100. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceEvent.kt +66 -0
  101. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceRegion.kt +96 -0
  102. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceTransition.kt +24 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofencingOptions.kt +56 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GetStoredBackgroundEventsOptions.kt +66 -0
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GetStoredBackgroundLocationsOptions.kt +66 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroBackgroundLocationSpec.kt +174 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundActivityType.kt +26 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundLocationOptions.kt +76 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundLocationStatus.kt +56 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderStatus.kt +7 -2
  111. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/StoredBackgroundEventEnvelope.kt +76 -0
  112. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/StoredBackgroundLocation.kt +111 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double.kt +88 -0
  114. package/nitrogen/generated/android/nitrogeolocation+autolinking.cmake +3 -0
  115. package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +20 -0
  116. package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.cpp +104 -15
  117. package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +1107 -50
  118. package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Umbrella.hpp +102 -0
  119. package/nitrogen/generated/ios/NitroGeolocationAutolinking.mm +8 -0
  120. package/nitrogen/generated/ios/NitroGeolocationAutolinking.swift +15 -3
  121. package/nitrogen/generated/ios/c++/HybridNitroBackgroundLocationSpecSwift.cpp +11 -0
  122. package/nitrogen/generated/ios/c++/HybridNitroBackgroundLocationSpecSwift.hpp +416 -0
  123. package/nitrogen/generated/ios/swift/ActivityRecognitionOptions.swift +96 -0
  124. package/nitrogen/generated/ios/swift/AndroidBackgroundLocationOptions.swift +76 -0
  125. package/nitrogen/generated/ios/swift/AndroidBackgroundLocationStatus.swift +58 -0
  126. package/nitrogen/generated/ios/swift/AndroidBackgroundProvider.swift +44 -0
  127. package/nitrogen/generated/ios/swift/AndroidForegroundServiceOptions.swift +160 -0
  128. package/nitrogen/generated/ios/swift/BackgroundEventEnvelope.swift +110 -0
  129. package/nitrogen/generated/ios/swift/BackgroundEventType.swift +56 -0
  130. package/nitrogen/generated/ios/swift/BackgroundHttpMethod.swift +44 -0
  131. package/nitrogen/generated/ios/swift/BackgroundHttpSyncOptions.swift +259 -0
  132. package/nitrogen/generated/ios/swift/BackgroundHttpSyncResult.swift +87 -0
  133. package/nitrogen/generated/ios/swift/BackgroundLocation.swift +118 -0
  134. package/nitrogen/generated/ios/swift/BackgroundLocationOptions.swift +292 -0
  135. package/nitrogen/generated/ios/swift/BackgroundLocationSource.swift +60 -0
  136. package/nitrogen/generated/ios/swift/BackgroundLocationState.swift +56 -0
  137. package/nitrogen/generated/ios/swift/BackgroundLocationStatus.swift +124 -0
  138. package/nitrogen/generated/ios/swift/BackgroundPermissionResult.swift +81 -0
  139. package/nitrogen/generated/ios/swift/BackgroundPermissionStatus.swift +48 -0
  140. package/nitrogen/generated/ios/swift/BackgroundTrackingMode.swift +44 -0
  141. package/nitrogen/generated/ios/swift/BatterySnapshot.swift +60 -0
  142. package/nitrogen/generated/ios/swift/DetectedActivity.swift +39 -0
  143. package/nitrogen/generated/ios/swift/DetectedActivityType.swift +64 -0
  144. package/nitrogen/generated/ios/swift/Func_void_BackgroundEventEnvelope.swift +46 -0
  145. package/nitrogen/generated/ios/swift/Func_void_BackgroundHttpSyncResult.swift +46 -0
  146. package/nitrogen/generated/ios/swift/Func_void_BackgroundLocation.swift +46 -0
  147. package/nitrogen/generated/ios/swift/Func_void_BackgroundLocationStatus.swift +46 -0
  148. package/nitrogen/generated/ios/swift/Func_void_BackgroundPermissionResult.swift +46 -0
  149. package/nitrogen/generated/ios/swift/Func_void_std__optional_BackgroundLocationOptions_.swift +46 -0
  150. package/nitrogen/generated/ios/swift/Func_void_std__vector_GeofenceRegion_.swift +46 -0
  151. package/nitrogen/generated/ios/swift/Func_void_std__vector_StoredBackgroundEventEnvelope_.swift +46 -0
  152. package/nitrogen/generated/ios/swift/Func_void_std__vector_StoredBackgroundLocation_.swift +46 -0
  153. package/nitrogen/generated/ios/swift/GeofenceEvent.swift +50 -0
  154. package/nitrogen/generated/ios/swift/GeofenceRegion.swift +195 -0
  155. package/nitrogen/generated/ios/swift/GeofenceTransition.swift +44 -0
  156. package/nitrogen/generated/ios/swift/GeofencingOptions.swift +66 -0
  157. package/nitrogen/generated/ios/swift/GetStoredBackgroundEventsOptions.swift +102 -0
  158. package/nitrogen/generated/ios/swift/GetStoredBackgroundLocationsOptions.swift +96 -0
  159. package/nitrogen/generated/ios/swift/HybridNitroBackgroundLocationSpec.swift +81 -0
  160. package/nitrogen/generated/ios/swift/HybridNitroBackgroundLocationSpec_cxx.swift +654 -0
  161. package/nitrogen/generated/ios/swift/IOSBackgroundActivityType.swift +52 -0
  162. package/nitrogen/generated/ios/swift/IOSBackgroundLocationOptions.swift +125 -0
  163. package/nitrogen/generated/ios/swift/IOSBackgroundLocationStatus.swift +34 -0
  164. package/nitrogen/generated/ios/swift/LocationProviderStatus.swift +19 -1
  165. package/nitrogen/generated/ios/swift/StoredBackgroundEventEnvelope.swift +54 -0
  166. package/nitrogen/generated/ios/swift/StoredBackgroundLocation.swift +120 -0
  167. package/nitrogen/generated/ios/swift/Variant_NullType_Bool_String_Double.swift +34 -0
  168. package/nitrogen/generated/shared/c++/ActivityRecognitionOptions.hpp +95 -0
  169. package/nitrogen/generated/shared/c++/AndroidBackgroundLocationOptions.hpp +100 -0
  170. package/nitrogen/generated/shared/c++/AndroidBackgroundLocationStatus.hpp +93 -0
  171. package/nitrogen/generated/shared/c++/AndroidBackgroundProvider.hpp +80 -0
  172. package/nitrogen/generated/shared/c++/AndroidForegroundServiceOptions.hpp +116 -0
  173. package/nitrogen/generated/shared/c++/BackgroundEventEnvelope.hpp +140 -0
  174. package/nitrogen/generated/shared/c++/BackgroundEventType.hpp +92 -0
  175. package/nitrogen/generated/shared/c++/BackgroundHttpMethod.hpp +80 -0
  176. package/nitrogen/generated/shared/c++/BackgroundHttpSyncOptions.hpp +129 -0
  177. package/nitrogen/generated/shared/c++/BackgroundHttpSyncResult.hpp +101 -0
  178. package/nitrogen/generated/shared/c++/BackgroundLocation.hpp +134 -0
  179. package/nitrogen/generated/shared/c++/BackgroundLocationOptions.hpp +174 -0
  180. package/nitrogen/generated/shared/c++/BackgroundLocationSource.hpp +96 -0
  181. package/nitrogen/generated/shared/c++/BackgroundLocationState.hpp +92 -0
  182. package/nitrogen/generated/shared/c++/BackgroundLocationStatus.hpp +158 -0
  183. package/nitrogen/generated/shared/c++/BackgroundPermissionResult.hpp +107 -0
  184. package/nitrogen/generated/shared/c++/BackgroundPermissionStatus.hpp +84 -0
  185. package/nitrogen/generated/shared/c++/BackgroundTrackingMode.hpp +80 -0
  186. package/nitrogen/generated/shared/c++/BatterySnapshot.hpp +87 -0
  187. package/nitrogen/generated/shared/c++/DetectedActivity.hpp +92 -0
  188. package/nitrogen/generated/shared/c++/DetectedActivityType.hpp +100 -0
  189. package/nitrogen/generated/shared/c++/GeofenceEvent.hpp +103 -0
  190. package/nitrogen/generated/shared/c++/GeofenceRegion.hpp +123 -0
  191. package/nitrogen/generated/shared/c++/GeofenceTransition.hpp +80 -0
  192. package/nitrogen/generated/shared/c++/GeofencingOptions.hpp +90 -0
  193. package/nitrogen/generated/shared/c++/GetStoredBackgroundEventsOptions.hpp +98 -0
  194. package/nitrogen/generated/shared/c++/GetStoredBackgroundLocationsOptions.hpp +95 -0
  195. package/nitrogen/generated/shared/c++/HybridNitroBackgroundLocationSpec.cpp +47 -0
  196. package/nitrogen/generated/shared/c++/HybridNitroBackgroundLocationSpec.hpp +133 -0
  197. package/nitrogen/generated/shared/c++/IOSBackgroundActivityType.hpp +88 -0
  198. package/nitrogen/generated/shared/c++/IOSBackgroundLocationOptions.hpp +105 -0
  199. package/nitrogen/generated/shared/c++/IOSBackgroundLocationStatus.hpp +87 -0
  200. package/nitrogen/generated/shared/c++/LocationProviderStatus.hpp +5 -1
  201. package/nitrogen/generated/shared/c++/StoredBackgroundEventEnvelope.hpp +108 -0
  202. package/nitrogen/generated/shared/c++/StoredBackgroundLocation.hpp +146 -0
  203. package/package.json +17 -6
  204. package/src/NitroGeolocation.nitro.ts +4 -4
  205. package/src/api/getCurrentPosition.ts +1 -1
  206. package/src/api/requestLocationSettings.ts +3 -2
  207. package/src/background/NitroBackgroundLocation.nitro.ts +83 -0
  208. package/src/background/index.ts +200 -0
  209. package/src/background/index.web.ts +120 -0
  210. package/src/background/task.ts +13 -0
  211. package/src/background/types.ts +328 -0
  212. package/src/compat/index.web.ts +141 -0
  213. package/src/index.tsx +3 -0
  214. package/src/index.web.tsx +41 -0
  215. package/src/publicTypes.ts +6 -5
  216. package/src/types.ts +3 -0
  217. package/src/web/browser.ts +171 -0
  218. package/src/web/index.ts +167 -0
  219. package/src/web/useWatchPosition.ts +76 -0
  220. package/src/web/watch.ts +81 -0
  221. package/src/devtools/index.test.ts +0 -54
  222. package/src/utils/errors.test.ts +0 -65
  223. package/src/utils/provider.test.ts +0 -303
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// DetectedActivity.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "DetectedActivity".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class DetectedActivity(
21
+ @DoNotStrip
22
+ @Keep
23
+ val type: DetectedActivityType,
24
+ @DoNotStrip
25
+ @Keep
26
+ val confidence: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val timestamp: Double
30
+ ) {
31
+ /* primary constructor */
32
+
33
+ override fun equals(other: Any?): Boolean {
34
+ if (this === other) return true
35
+ if (other !is DetectedActivity) return false
36
+ return Objects.deepEquals(this.type, other.type)
37
+ && Objects.deepEquals(this.confidence, other.confidence)
38
+ && Objects.deepEquals(this.timestamp, other.timestamp)
39
+ }
40
+
41
+ override fun hashCode(): Int {
42
+ return arrayOf(
43
+ type,
44
+ confidence,
45
+ timestamp
46
+ ).contentDeepHashCode()
47
+ }
48
+
49
+ companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(type: DetectedActivityType, confidence: Double, timestamp: Double): DetectedActivity {
58
+ return DetectedActivity(type, confidence, timestamp)
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,29 @@
1
+ ///
2
+ /// DetectedActivityType.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+ /**
14
+ * Represents the JavaScript enum/union "DetectedActivityType".
15
+ */
16
+ @DoNotStrip
17
+ @Keep
18
+ enum class DetectedActivityType(@DoNotStrip @Keep val value: Int) {
19
+ UNKNOWN(0),
20
+ RUNNING(1),
21
+ STILL(2),
22
+ WALKING(3),
23
+ ONFOOT(4),
24
+ ONBICYCLE(5),
25
+ INVEHICLE(6),
26
+ TILTING(7);
27
+
28
+ companion object
29
+ }
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_BackgroundEventEnvelope.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(event: struct) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_BackgroundEventEnvelope: (BackgroundEventEnvelope) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(event: BackgroundEventEnvelope): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(event: struct) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_BackgroundEventEnvelope_cxx: Func_void_BackgroundEventEnvelope {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(event: BackgroundEventEnvelope): Unit
60
+ = invoke_cxx(event)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(event: BackgroundEventEnvelope): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(event: struct) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(BackgroundEventEnvelope) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_BackgroundEventEnvelope_java(private val function: (BackgroundEventEnvelope) -> Unit): Func_void_BackgroundEventEnvelope {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(event: BackgroundEventEnvelope): Unit {
78
+ return this.function(event)
79
+ }
80
+ }
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_BackgroundLocation.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(location: struct) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_BackgroundLocation: (BackgroundLocation) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(location: BackgroundLocation): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(location: struct) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_BackgroundLocation_cxx: Func_void_BackgroundLocation {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(location: BackgroundLocation): Unit
60
+ = invoke_cxx(location)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(location: BackgroundLocation): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(location: struct) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(BackgroundLocation) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_BackgroundLocation_java(private val function: (BackgroundLocation) -> Unit): Func_void_BackgroundLocation {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(location: BackgroundLocation): Unit {
78
+ return this.function(location)
79
+ }
80
+ }
@@ -0,0 +1,66 @@
1
+ ///
2
+ /// GeofenceEvent.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "GeofenceEvent".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class GeofenceEvent(
21
+ @DoNotStrip
22
+ @Keep
23
+ val region: GeofenceRegion,
24
+ @DoNotStrip
25
+ @Keep
26
+ val transition: GeofenceTransition,
27
+ @DoNotStrip
28
+ @Keep
29
+ val location: BackgroundLocation?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val timestamp: Double
33
+ ) {
34
+ /* primary constructor */
35
+
36
+ override fun equals(other: Any?): Boolean {
37
+ if (this === other) return true
38
+ if (other !is GeofenceEvent) return false
39
+ return Objects.deepEquals(this.region, other.region)
40
+ && Objects.deepEquals(this.transition, other.transition)
41
+ && Objects.deepEquals(this.location, other.location)
42
+ && Objects.deepEquals(this.timestamp, other.timestamp)
43
+ }
44
+
45
+ override fun hashCode(): Int {
46
+ return arrayOf(
47
+ region,
48
+ transition,
49
+ location,
50
+ timestamp
51
+ ).contentDeepHashCode()
52
+ }
53
+
54
+ companion object {
55
+ /**
56
+ * Constructor called from C++
57
+ */
58
+ @DoNotStrip
59
+ @Keep
60
+ @Suppress("unused")
61
+ @JvmStatic
62
+ private fun fromCpp(region: GeofenceRegion, transition: GeofenceTransition, location: BackgroundLocation?, timestamp: Double): GeofenceEvent {
63
+ return GeofenceEvent(region, transition, location, timestamp)
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,96 @@
1
+ ///
2
+ /// GeofenceRegion.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+ import com.margelo.nitro.core.NullType
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "GeofenceRegion".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class GeofenceRegion(
21
+ @DoNotStrip
22
+ @Keep
23
+ val identifier: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val latitude: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val longitude: Double,
30
+ @DoNotStrip
31
+ @Keep
32
+ val radius: Double,
33
+ @DoNotStrip
34
+ @Keep
35
+ val notifyOnEntry: Boolean?,
36
+ @DoNotStrip
37
+ @Keep
38
+ val notifyOnExit: Boolean?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val notifyOnDwell: Boolean?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val loiteringDelay: Double?,
45
+ @DoNotStrip
46
+ @Keep
47
+ val expirationDuration: Double?,
48
+ @DoNotStrip
49
+ @Keep
50
+ val metadata: Map<String, Variant_NullType_Boolean_String_Double>?
51
+ ) {
52
+ /* primary constructor */
53
+
54
+ override fun equals(other: Any?): Boolean {
55
+ if (this === other) return true
56
+ if (other !is GeofenceRegion) return false
57
+ return Objects.deepEquals(this.identifier, other.identifier)
58
+ && Objects.deepEquals(this.latitude, other.latitude)
59
+ && Objects.deepEquals(this.longitude, other.longitude)
60
+ && Objects.deepEquals(this.radius, other.radius)
61
+ && Objects.deepEquals(this.notifyOnEntry, other.notifyOnEntry)
62
+ && Objects.deepEquals(this.notifyOnExit, other.notifyOnExit)
63
+ && Objects.deepEquals(this.notifyOnDwell, other.notifyOnDwell)
64
+ && Objects.deepEquals(this.loiteringDelay, other.loiteringDelay)
65
+ && Objects.deepEquals(this.expirationDuration, other.expirationDuration)
66
+ && Objects.deepEquals(this.metadata, other.metadata)
67
+ }
68
+
69
+ override fun hashCode(): Int {
70
+ return arrayOf(
71
+ identifier,
72
+ latitude,
73
+ longitude,
74
+ radius,
75
+ notifyOnEntry,
76
+ notifyOnExit,
77
+ notifyOnDwell,
78
+ loiteringDelay,
79
+ expirationDuration,
80
+ metadata
81
+ ).contentDeepHashCode()
82
+ }
83
+
84
+ companion object {
85
+ /**
86
+ * Constructor called from C++
87
+ */
88
+ @DoNotStrip
89
+ @Keep
90
+ @Suppress("unused")
91
+ @JvmStatic
92
+ private fun fromCpp(identifier: String, latitude: Double, longitude: Double, radius: Double, notifyOnEntry: Boolean?, notifyOnExit: Boolean?, notifyOnDwell: Boolean?, loiteringDelay: Double?, expirationDuration: Double?, metadata: Map<String, Variant_NullType_Boolean_String_Double>?): GeofenceRegion {
93
+ return GeofenceRegion(identifier, latitude, longitude, radius, notifyOnEntry, notifyOnExit, notifyOnDwell, loiteringDelay, expirationDuration, metadata)
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,24 @@
1
+ ///
2
+ /// GeofenceTransition.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+ /**
14
+ * Represents the JavaScript enum/union "GeofenceTransition".
15
+ */
16
+ @DoNotStrip
17
+ @Keep
18
+ enum class GeofenceTransition(@DoNotStrip @Keep val value: Int) {
19
+ ENTER(0),
20
+ EXIT(1),
21
+ DWELL(2);
22
+
23
+ companion object
24
+ }
@@ -0,0 +1,56 @@
1
+ ///
2
+ /// GeofencingOptions.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "GeofencingOptions".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class GeofencingOptions(
21
+ @DoNotStrip
22
+ @Keep
23
+ val initialTrigger: Array<GeofenceTransition>?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val notificationResponsiveness: Double?
27
+ ) {
28
+ /* primary constructor */
29
+
30
+ override fun equals(other: Any?): Boolean {
31
+ if (this === other) return true
32
+ if (other !is GeofencingOptions) return false
33
+ return Objects.deepEquals(this.initialTrigger, other.initialTrigger)
34
+ && Objects.deepEquals(this.notificationResponsiveness, other.notificationResponsiveness)
35
+ }
36
+
37
+ override fun hashCode(): Int {
38
+ return arrayOf(
39
+ initialTrigger,
40
+ notificationResponsiveness
41
+ ).contentDeepHashCode()
42
+ }
43
+
44
+ companion object {
45
+ /**
46
+ * Constructor called from C++
47
+ */
48
+ @DoNotStrip
49
+ @Keep
50
+ @Suppress("unused")
51
+ @JvmStatic
52
+ private fun fromCpp(initialTrigger: Array<GeofenceTransition>?, notificationResponsiveness: Double?): GeofencingOptions {
53
+ return GeofencingOptions(initialTrigger, notificationResponsiveness)
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,66 @@
1
+ ///
2
+ /// GetStoredBackgroundEventsOptions.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "GetStoredBackgroundEventsOptions".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class GetStoredBackgroundEventsOptions(
21
+ @DoNotStrip
22
+ @Keep
23
+ val types: Array<BackgroundEventType>?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val limit: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val since: Double?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val includeDelivered: Boolean?
33
+ ) {
34
+ /* primary constructor */
35
+
36
+ override fun equals(other: Any?): Boolean {
37
+ if (this === other) return true
38
+ if (other !is GetStoredBackgroundEventsOptions) return false
39
+ return Objects.deepEquals(this.types, other.types)
40
+ && Objects.deepEquals(this.limit, other.limit)
41
+ && Objects.deepEquals(this.since, other.since)
42
+ && Objects.deepEquals(this.includeDelivered, other.includeDelivered)
43
+ }
44
+
45
+ override fun hashCode(): Int {
46
+ return arrayOf(
47
+ types,
48
+ limit,
49
+ since,
50
+ includeDelivered
51
+ ).contentDeepHashCode()
52
+ }
53
+
54
+ companion object {
55
+ /**
56
+ * Constructor called from C++
57
+ */
58
+ @DoNotStrip
59
+ @Keep
60
+ @Suppress("unused")
61
+ @JvmStatic
62
+ private fun fromCpp(types: Array<BackgroundEventType>?, limit: Double?, since: Double?, includeDelivered: Boolean?): GetStoredBackgroundEventsOptions {
63
+ return GetStoredBackgroundEventsOptions(types, limit, since, includeDelivered)
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,66 @@
1
+ ///
2
+ /// GetStoredBackgroundLocationsOptions.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitrogeolocation
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "GetStoredBackgroundLocationsOptions".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class GetStoredBackgroundLocationsOptions(
21
+ @DoNotStrip
22
+ @Keep
23
+ val limit: Double?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val since: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val includeDelivered: Boolean?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val includeSynced: Boolean?
33
+ ) {
34
+ /* primary constructor */
35
+
36
+ override fun equals(other: Any?): Boolean {
37
+ if (this === other) return true
38
+ if (other !is GetStoredBackgroundLocationsOptions) return false
39
+ return Objects.deepEquals(this.limit, other.limit)
40
+ && Objects.deepEquals(this.since, other.since)
41
+ && Objects.deepEquals(this.includeDelivered, other.includeDelivered)
42
+ && Objects.deepEquals(this.includeSynced, other.includeSynced)
43
+ }
44
+
45
+ override fun hashCode(): Int {
46
+ return arrayOf(
47
+ limit,
48
+ since,
49
+ includeDelivered,
50
+ includeSynced
51
+ ).contentDeepHashCode()
52
+ }
53
+
54
+ companion object {
55
+ /**
56
+ * Constructor called from C++
57
+ */
58
+ @DoNotStrip
59
+ @Keep
60
+ @Suppress("unused")
61
+ @JvmStatic
62
+ private fun fromCpp(limit: Double?, since: Double?, includeDelivered: Boolean?, includeSynced: Boolean?): GetStoredBackgroundLocationsOptions {
63
+ return GetStoredBackgroundLocationsOptions(limit, since, includeDelivered, includeSynced)
64
+ }
65
+ }
66
+ }