react-native-nitro-geolocation 1.2.5 → 1.3.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.
- package/README.md +55 -278
- package/android/build.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +39 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidFusedLocationProvider.kt +310 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidFusedRequestFactory.kt +31 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationConversions.kt +71 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationErrors.kt +85 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationOptions.kt +92 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidLocationSettings.kt +3 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidProviderRoute.kt +74 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroBackgroundLocation.kt +132 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocation.kt +219 -476
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundHttpSync.kt +134 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundPermissions.kt +196 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundSerialization.kt +266 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroActivityRecognitionReceiver.kt +13 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundEventHub.kt +65 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundHeadlessTaskService.kt +58 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundLocationController.kt +710 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundLocationService.kt +48 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundNotificationFactory.kt +37 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundStore.kt +655 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBootReceiver.kt +26 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroGeofenceReceiver.kt +14 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroLocationUpdateReceiver.kt +37 -0
- package/android/src/test/java/com/margelo/nitro/nitrogeolocation/AndroidFusedLocationProviderTest.kt +64 -0
- package/android/src/test/java/com/margelo/nitro/nitrogeolocation/AndroidProviderRouteTest.kt +116 -0
- package/ios/IOSBackgroundHttpSync.swift +126 -0
- package/ios/IOSBackgroundLocationDelegate.swift +36 -0
- package/ios/IOSBackgroundMotion.swift +55 -0
- package/ios/IOSBackgroundSerialization.swift +539 -0
- package/ios/IOSGeolocationConversions.swift +131 -0
- package/ios/IOSGeolocationDelegate.swift +31 -0
- package/ios/IOSGeolocationErrors.swift +39 -0
- package/ios/IOSGeolocationOptions.swift +135 -0
- package/ios/NitroBackgroundLocation.swift +849 -0
- package/ios/NitroGeolocation.swift +14 -347
- package/nitrogen/generated/android/c++/JActivityRecognitionOptions.hpp +69 -0
- package/nitrogen/generated/android/c++/JAndroidBackgroundLocationOptions.hpp +74 -0
- package/nitrogen/generated/android/c++/JAndroidBackgroundLocationStatus.hpp +67 -0
- package/nitrogen/generated/android/c++/JAndroidBackgroundProvider.hpp +61 -0
- package/nitrogen/generated/android/c++/JAndroidForegroundServiceOptions.hpp +90 -0
- package/nitrogen/generated/android/c++/JBackgroundEventEnvelope.hpp +129 -0
- package/nitrogen/generated/android/c++/JBackgroundEventType.hpp +70 -0
- package/nitrogen/generated/android/c++/JBackgroundHttpMethod.hpp +61 -0
- package/nitrogen/generated/android/c++/JBackgroundHttpSyncOptions.hpp +131 -0
- package/nitrogen/generated/android/c++/JBackgroundHttpSyncResult.hpp +111 -0
- package/nitrogen/generated/android/c++/JBackgroundLocation.hpp +110 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationOptions.hpp +162 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationSource.hpp +73 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationState.hpp +70 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationStatus.hpp +126 -0
- package/nitrogen/generated/android/c++/JBackgroundPermissionResult.hpp +79 -0
- package/nitrogen/generated/android/c++/JBackgroundPermissionStatus.hpp +64 -0
- package/nitrogen/generated/android/c++/JBackgroundTrackingMode.hpp +61 -0
- package/nitrogen/generated/android/c++/JBatterySnapshot.hpp +61 -0
- package/nitrogen/generated/android/c++/JDetectedActivity.hpp +66 -0
- package/nitrogen/generated/android/c++/JDetectedActivityType.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_BackgroundEventEnvelope.hpp +114 -0
- package/nitrogen/generated/android/c++/JFunc_void_BackgroundLocation.hpp +95 -0
- package/nitrogen/generated/android/c++/JGeofenceEvent.hpp +94 -0
- package/nitrogen/generated/android/c++/JGeofenceRegion.hpp +112 -0
- package/nitrogen/generated/android/c++/JGeofenceTransition.hpp +61 -0
- package/nitrogen/generated/android/c++/JGeofencingOptions.hpp +82 -0
- package/nitrogen/generated/android/c++/JGetStoredBackgroundEventsOptions.hpp +90 -0
- package/nitrogen/generated/android/c++/JGetStoredBackgroundLocationsOptions.hpp +69 -0
- package/nitrogen/generated/android/c++/JHybridNitroBackgroundLocationSpec.cpp +662 -0
- package/nitrogen/generated/android/c++/JHybridNitroBackgroundLocationSpec.hpp +89 -0
- package/nitrogen/generated/android/c++/JIOSBackgroundActivityType.hpp +67 -0
- package/nitrogen/generated/android/c++/JIOSBackgroundLocationOptions.hpp +79 -0
- package/nitrogen/generated/android/c++/JIOSBackgroundLocationStatus.hpp +61 -0
- package/nitrogen/generated/android/c++/JLocationProviderStatus.hpp +5 -1
- package/nitrogen/generated/android/c++/JStoredBackgroundEventEnvelope.hpp +115 -0
- package/nitrogen/generated/android/c++/JStoredBackgroundLocation.hpp +122 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean_String_Double.cpp +34 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean_String_Double.hpp +100 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ActivityRecognitionOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundLocationOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundLocationStatus.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundProvider.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidForegroundServiceOptions.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventEnvelope.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventType.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpMethod.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpSyncOptions.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpSyncResult.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocation.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationOptions.kt +136 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationSource.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationState.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationStatus.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundPermissionResult.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundPermissionStatus.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundTrackingMode.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BatterySnapshot.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/DetectedActivity.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/DetectedActivityType.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_BackgroundEventEnvelope.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_BackgroundLocation.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceEvent.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceRegion.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceTransition.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofencingOptions.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GetStoredBackgroundEventsOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GetStoredBackgroundLocationsOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroBackgroundLocationSpec.kt +174 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundActivityType.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundLocationOptions.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundLocationStatus.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderStatus.kt +7 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/StoredBackgroundEventEnvelope.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/StoredBackgroundLocation.kt +111 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double.kt +88 -0
- package/nitrogen/generated/android/nitrogeolocation+autolinking.cmake +3 -0
- package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +20 -0
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.cpp +104 -15
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +1107 -50
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Umbrella.hpp +102 -0
- package/nitrogen/generated/ios/NitroGeolocationAutolinking.mm +8 -0
- package/nitrogen/generated/ios/NitroGeolocationAutolinking.swift +15 -3
- package/nitrogen/generated/ios/c++/HybridNitroBackgroundLocationSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroBackgroundLocationSpecSwift.hpp +416 -0
- package/nitrogen/generated/ios/swift/ActivityRecognitionOptions.swift +96 -0
- package/nitrogen/generated/ios/swift/AndroidBackgroundLocationOptions.swift +76 -0
- package/nitrogen/generated/ios/swift/AndroidBackgroundLocationStatus.swift +58 -0
- package/nitrogen/generated/ios/swift/AndroidBackgroundProvider.swift +44 -0
- package/nitrogen/generated/ios/swift/AndroidForegroundServiceOptions.swift +160 -0
- package/nitrogen/generated/ios/swift/BackgroundEventEnvelope.swift +110 -0
- package/nitrogen/generated/ios/swift/BackgroundEventType.swift +56 -0
- package/nitrogen/generated/ios/swift/BackgroundHttpMethod.swift +44 -0
- package/nitrogen/generated/ios/swift/BackgroundHttpSyncOptions.swift +259 -0
- package/nitrogen/generated/ios/swift/BackgroundHttpSyncResult.swift +87 -0
- package/nitrogen/generated/ios/swift/BackgroundLocation.swift +118 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationOptions.swift +292 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationSource.swift +60 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationState.swift +56 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationStatus.swift +124 -0
- package/nitrogen/generated/ios/swift/BackgroundPermissionResult.swift +81 -0
- package/nitrogen/generated/ios/swift/BackgroundPermissionStatus.swift +48 -0
- package/nitrogen/generated/ios/swift/BackgroundTrackingMode.swift +44 -0
- package/nitrogen/generated/ios/swift/BatterySnapshot.swift +60 -0
- package/nitrogen/generated/ios/swift/DetectedActivity.swift +39 -0
- package/nitrogen/generated/ios/swift/DetectedActivityType.swift +64 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundEventEnvelope.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundHttpSyncResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundLocation.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundLocationStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundPermissionResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BackgroundLocationOptions_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_GeofenceRegion_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StoredBackgroundEventEnvelope_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StoredBackgroundLocation_.swift +46 -0
- package/nitrogen/generated/ios/swift/GeofenceEvent.swift +50 -0
- package/nitrogen/generated/ios/swift/GeofenceRegion.swift +195 -0
- package/nitrogen/generated/ios/swift/GeofenceTransition.swift +44 -0
- package/nitrogen/generated/ios/swift/GeofencingOptions.swift +66 -0
- package/nitrogen/generated/ios/swift/GetStoredBackgroundEventsOptions.swift +102 -0
- package/nitrogen/generated/ios/swift/GetStoredBackgroundLocationsOptions.swift +96 -0
- package/nitrogen/generated/ios/swift/HybridNitroBackgroundLocationSpec.swift +81 -0
- package/nitrogen/generated/ios/swift/HybridNitroBackgroundLocationSpec_cxx.swift +654 -0
- package/nitrogen/generated/ios/swift/IOSBackgroundActivityType.swift +52 -0
- package/nitrogen/generated/ios/swift/IOSBackgroundLocationOptions.swift +125 -0
- package/nitrogen/generated/ios/swift/IOSBackgroundLocationStatus.swift +34 -0
- package/nitrogen/generated/ios/swift/LocationProviderStatus.swift +19 -1
- package/nitrogen/generated/ios/swift/StoredBackgroundEventEnvelope.swift +54 -0
- package/nitrogen/generated/ios/swift/StoredBackgroundLocation.swift +120 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_Bool_String_Double.swift +34 -0
- package/nitrogen/generated/shared/c++/ActivityRecognitionOptions.hpp +95 -0
- package/nitrogen/generated/shared/c++/AndroidBackgroundLocationOptions.hpp +100 -0
- package/nitrogen/generated/shared/c++/AndroidBackgroundLocationStatus.hpp +93 -0
- package/nitrogen/generated/shared/c++/AndroidBackgroundProvider.hpp +80 -0
- package/nitrogen/generated/shared/c++/AndroidForegroundServiceOptions.hpp +116 -0
- package/nitrogen/generated/shared/c++/BackgroundEventEnvelope.hpp +140 -0
- package/nitrogen/generated/shared/c++/BackgroundEventType.hpp +92 -0
- package/nitrogen/generated/shared/c++/BackgroundHttpMethod.hpp +80 -0
- package/nitrogen/generated/shared/c++/BackgroundHttpSyncOptions.hpp +129 -0
- package/nitrogen/generated/shared/c++/BackgroundHttpSyncResult.hpp +101 -0
- package/nitrogen/generated/shared/c++/BackgroundLocation.hpp +134 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationOptions.hpp +174 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationSource.hpp +96 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationState.hpp +92 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationStatus.hpp +158 -0
- package/nitrogen/generated/shared/c++/BackgroundPermissionResult.hpp +107 -0
- package/nitrogen/generated/shared/c++/BackgroundPermissionStatus.hpp +84 -0
- package/nitrogen/generated/shared/c++/BackgroundTrackingMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/BatterySnapshot.hpp +87 -0
- package/nitrogen/generated/shared/c++/DetectedActivity.hpp +92 -0
- package/nitrogen/generated/shared/c++/DetectedActivityType.hpp +100 -0
- package/nitrogen/generated/shared/c++/GeofenceEvent.hpp +103 -0
- package/nitrogen/generated/shared/c++/GeofenceRegion.hpp +123 -0
- package/nitrogen/generated/shared/c++/GeofenceTransition.hpp +80 -0
- package/nitrogen/generated/shared/c++/GeofencingOptions.hpp +90 -0
- package/nitrogen/generated/shared/c++/GetStoredBackgroundEventsOptions.hpp +98 -0
- package/nitrogen/generated/shared/c++/GetStoredBackgroundLocationsOptions.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridNitroBackgroundLocationSpec.cpp +47 -0
- package/nitrogen/generated/shared/c++/HybridNitroBackgroundLocationSpec.hpp +133 -0
- package/nitrogen/generated/shared/c++/IOSBackgroundActivityType.hpp +88 -0
- package/nitrogen/generated/shared/c++/IOSBackgroundLocationOptions.hpp +105 -0
- package/nitrogen/generated/shared/c++/IOSBackgroundLocationStatus.hpp +87 -0
- package/nitrogen/generated/shared/c++/LocationProviderStatus.hpp +5 -1
- package/nitrogen/generated/shared/c++/StoredBackgroundEventEnvelope.hpp +108 -0
- package/nitrogen/generated/shared/c++/StoredBackgroundLocation.hpp +146 -0
- package/package.json +17 -6
- package/src/NitroGeolocation.nitro.ts +4 -4
- package/src/api/getCurrentPosition.ts +1 -1
- package/src/api/requestLocationSettings.ts +3 -2
- package/src/background/NitroBackgroundLocation.nitro.ts +83 -0
- package/src/background/index.ts +200 -0
- package/src/background/index.web.ts +120 -0
- package/src/background/task.ts +13 -0
- package/src/background/types.ts +328 -0
- package/src/compat/index.web.ts +141 -0
- package/src/index.tsx +3 -0
- package/src/index.web.tsx +41 -0
- package/src/publicTypes.ts +6 -5
- package/src/types.ts +3 -0
- package/src/web/browser.ts +171 -0
- package/src/web/index.ts +167 -0
- package/src/web/useWatchPosition.ts +76 -0
- package/src/web/watch.ts +81 -0
- package/src/devtools/index.test.ts +0 -54
- package/src/utils/errors.test.ts +0 -65
- package/src/utils/provider.test.ts +0 -303
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundHttpSyncResult.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 "BackgroundHttpSyncResult".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundHttpSyncResult(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val success: Boolean,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val statusCode: Double?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val syncedLocationIds: Array<String>,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val failedLocationIds: Array<String>,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val error: String?
|
|
36
|
+
) {
|
|
37
|
+
/* primary constructor */
|
|
38
|
+
|
|
39
|
+
override fun equals(other: Any?): Boolean {
|
|
40
|
+
if (this === other) return true
|
|
41
|
+
if (other !is BackgroundHttpSyncResult) return false
|
|
42
|
+
return Objects.deepEquals(this.success, other.success)
|
|
43
|
+
&& Objects.deepEquals(this.statusCode, other.statusCode)
|
|
44
|
+
&& Objects.deepEquals(this.syncedLocationIds, other.syncedLocationIds)
|
|
45
|
+
&& Objects.deepEquals(this.failedLocationIds, other.failedLocationIds)
|
|
46
|
+
&& Objects.deepEquals(this.error, other.error)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun hashCode(): Int {
|
|
50
|
+
return arrayOf(
|
|
51
|
+
success,
|
|
52
|
+
statusCode,
|
|
53
|
+
syncedLocationIds,
|
|
54
|
+
failedLocationIds,
|
|
55
|
+
error
|
|
56
|
+
).contentDeepHashCode()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
companion object {
|
|
60
|
+
/**
|
|
61
|
+
* Constructor called from C++
|
|
62
|
+
*/
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
@Suppress("unused")
|
|
66
|
+
@JvmStatic
|
|
67
|
+
private fun fromCpp(success: Boolean, statusCode: Double?, syncedLocationIds: Array<String>, failedLocationIds: Array<String>, error: String?): BackgroundHttpSyncResult {
|
|
68
|
+
return BackgroundHttpSyncResult(success, statusCode, syncedLocationIds, failedLocationIds, error)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocation.kt
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// 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.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "BackgroundLocation".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundLocation(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val id: String?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val source: BackgroundLocationSource,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val isFromBackground: Boolean,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val provider: LocationProviderUsed?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val mocked: Boolean?,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val recordedAt: Double,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val activity: DetectedActivity?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val battery: BatterySnapshot?,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val coords: GeolocationCoordinates,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val timestamp: Double
|
|
51
|
+
) {
|
|
52
|
+
/* primary constructor */
|
|
53
|
+
|
|
54
|
+
override fun equals(other: Any?): Boolean {
|
|
55
|
+
if (this === other) return true
|
|
56
|
+
if (other !is BackgroundLocation) return false
|
|
57
|
+
return Objects.deepEquals(this.id, other.id)
|
|
58
|
+
&& Objects.deepEquals(this.source, other.source)
|
|
59
|
+
&& Objects.deepEquals(this.isFromBackground, other.isFromBackground)
|
|
60
|
+
&& Objects.deepEquals(this.provider, other.provider)
|
|
61
|
+
&& Objects.deepEquals(this.mocked, other.mocked)
|
|
62
|
+
&& Objects.deepEquals(this.recordedAt, other.recordedAt)
|
|
63
|
+
&& Objects.deepEquals(this.activity, other.activity)
|
|
64
|
+
&& Objects.deepEquals(this.battery, other.battery)
|
|
65
|
+
&& Objects.deepEquals(this.coords, other.coords)
|
|
66
|
+
&& Objects.deepEquals(this.timestamp, other.timestamp)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
override fun hashCode(): Int {
|
|
70
|
+
return arrayOf(
|
|
71
|
+
id,
|
|
72
|
+
source,
|
|
73
|
+
isFromBackground,
|
|
74
|
+
provider,
|
|
75
|
+
mocked,
|
|
76
|
+
recordedAt,
|
|
77
|
+
activity,
|
|
78
|
+
battery,
|
|
79
|
+
coords,
|
|
80
|
+
timestamp
|
|
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(id: String?, source: BackgroundLocationSource, isFromBackground: Boolean, provider: LocationProviderUsed?, mocked: Boolean?, recordedAt: Double, activity: DetectedActivity?, battery: BatterySnapshot?, coords: GeolocationCoordinates, timestamp: Double): BackgroundLocation {
|
|
93
|
+
return BackgroundLocation(id, source, isFromBackground, provider, mocked, recordedAt, activity, battery, coords, timestamp)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundLocationOptions.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 "BackgroundLocationOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundLocationOptions(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val trackingMode: BackgroundTrackingMode?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val accuracy: LocationAccuracyOptions?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val granularity: AndroidGranularity?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val interval: Double?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val fastestInterval: Double?,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val distanceFilter: Double?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val maxUpdateDelay: Double?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val waitForAccurateLocation: Boolean?,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val persist: Boolean?,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val maxStoredLocations: Double?,
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
val maxStoredEvents: Double?,
|
|
54
|
+
@DoNotStrip
|
|
55
|
+
@Keep
|
|
56
|
+
val stopOnTerminate: Boolean?,
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
@Keep
|
|
59
|
+
val startOnBoot: Boolean?,
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
@Keep
|
|
62
|
+
val android: AndroidBackgroundLocationOptions?,
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
val ios: IOSBackgroundLocationOptions?,
|
|
66
|
+
@DoNotStrip
|
|
67
|
+
@Keep
|
|
68
|
+
val geofencing: GeofencingOptions?,
|
|
69
|
+
@DoNotStrip
|
|
70
|
+
@Keep
|
|
71
|
+
val activityRecognition: ActivityRecognitionOptions?,
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
val sync: BackgroundHttpSyncOptions?
|
|
75
|
+
) {
|
|
76
|
+
/* primary constructor */
|
|
77
|
+
|
|
78
|
+
override fun equals(other: Any?): Boolean {
|
|
79
|
+
if (this === other) return true
|
|
80
|
+
if (other !is BackgroundLocationOptions) return false
|
|
81
|
+
return Objects.deepEquals(this.trackingMode, other.trackingMode)
|
|
82
|
+
&& Objects.deepEquals(this.accuracy, other.accuracy)
|
|
83
|
+
&& Objects.deepEquals(this.granularity, other.granularity)
|
|
84
|
+
&& Objects.deepEquals(this.interval, other.interval)
|
|
85
|
+
&& Objects.deepEquals(this.fastestInterval, other.fastestInterval)
|
|
86
|
+
&& Objects.deepEquals(this.distanceFilter, other.distanceFilter)
|
|
87
|
+
&& Objects.deepEquals(this.maxUpdateDelay, other.maxUpdateDelay)
|
|
88
|
+
&& Objects.deepEquals(this.waitForAccurateLocation, other.waitForAccurateLocation)
|
|
89
|
+
&& Objects.deepEquals(this.persist, other.persist)
|
|
90
|
+
&& Objects.deepEquals(this.maxStoredLocations, other.maxStoredLocations)
|
|
91
|
+
&& Objects.deepEquals(this.maxStoredEvents, other.maxStoredEvents)
|
|
92
|
+
&& Objects.deepEquals(this.stopOnTerminate, other.stopOnTerminate)
|
|
93
|
+
&& Objects.deepEquals(this.startOnBoot, other.startOnBoot)
|
|
94
|
+
&& Objects.deepEquals(this.android, other.android)
|
|
95
|
+
&& Objects.deepEquals(this.ios, other.ios)
|
|
96
|
+
&& Objects.deepEquals(this.geofencing, other.geofencing)
|
|
97
|
+
&& Objects.deepEquals(this.activityRecognition, other.activityRecognition)
|
|
98
|
+
&& Objects.deepEquals(this.sync, other.sync)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
override fun hashCode(): Int {
|
|
102
|
+
return arrayOf(
|
|
103
|
+
trackingMode,
|
|
104
|
+
accuracy,
|
|
105
|
+
granularity,
|
|
106
|
+
interval,
|
|
107
|
+
fastestInterval,
|
|
108
|
+
distanceFilter,
|
|
109
|
+
maxUpdateDelay,
|
|
110
|
+
waitForAccurateLocation,
|
|
111
|
+
persist,
|
|
112
|
+
maxStoredLocations,
|
|
113
|
+
maxStoredEvents,
|
|
114
|
+
stopOnTerminate,
|
|
115
|
+
startOnBoot,
|
|
116
|
+
android,
|
|
117
|
+
ios,
|
|
118
|
+
geofencing,
|
|
119
|
+
activityRecognition,
|
|
120
|
+
sync
|
|
121
|
+
).contentDeepHashCode()
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
companion object {
|
|
125
|
+
/**
|
|
126
|
+
* Constructor called from C++
|
|
127
|
+
*/
|
|
128
|
+
@DoNotStrip
|
|
129
|
+
@Keep
|
|
130
|
+
@Suppress("unused")
|
|
131
|
+
@JvmStatic
|
|
132
|
+
private fun fromCpp(trackingMode: BackgroundTrackingMode?, accuracy: LocationAccuracyOptions?, granularity: AndroidGranularity?, interval: Double?, fastestInterval: Double?, distanceFilter: Double?, maxUpdateDelay: Double?, waitForAccurateLocation: Boolean?, persist: Boolean?, maxStoredLocations: Double?, maxStoredEvents: Double?, stopOnTerminate: Boolean?, startOnBoot: Boolean?, android: AndroidBackgroundLocationOptions?, ios: IOSBackgroundLocationOptions?, geofencing: GeofencingOptions?, activityRecognition: ActivityRecognitionOptions?, sync: BackgroundHttpSyncOptions?): BackgroundLocationOptions {
|
|
133
|
+
return BackgroundLocationOptions(trackingMode, accuracy, granularity, interval, fastestInterval, distanceFilter, maxUpdateDelay, waitForAccurateLocation, persist, maxStoredLocations, maxStoredEvents, stopOnTerminate, startOnBoot, android, ios, geofencing, activityRecognition, sync)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundLocationSource.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 "BackgroundLocationSource".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BackgroundLocationSource(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
UNKNOWN(0),
|
|
20
|
+
FOREGROUNDSERVICE(1),
|
|
21
|
+
BACKGROUND(2),
|
|
22
|
+
SIGNIFICANTCHANGE(3),
|
|
23
|
+
GEOFENCE(4),
|
|
24
|
+
DEFERRED(5),
|
|
25
|
+
MANUAL(6);
|
|
26
|
+
|
|
27
|
+
companion object
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundLocationState.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 "BackgroundLocationState".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BackgroundLocationState(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
IDLE(0),
|
|
20
|
+
STARTING(1),
|
|
21
|
+
RUNNING(2),
|
|
22
|
+
STOPPING(3),
|
|
23
|
+
STOPPED(4),
|
|
24
|
+
ERROR(5);
|
|
25
|
+
|
|
26
|
+
companion object
|
|
27
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundLocationStatus.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 "BackgroundLocationStatus".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundLocationStatus(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val state: BackgroundLocationState,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val isRunning: Boolean,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val isConfigured: Boolean,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val foregroundPermission: PermissionStatus,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val backgroundPermission: BackgroundPermissionStatus,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val accuracyAuthorization: AccuracyAuthorization?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val locationServicesEnabled: Boolean,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val providerStatus: LocationProviderStatus?,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val storedLocationCount: Double,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val storedEventCount: Double,
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
val geofenceCount: Double,
|
|
54
|
+
@DoNotStrip
|
|
55
|
+
@Keep
|
|
56
|
+
val android: AndroidBackgroundLocationStatus?,
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
@Keep
|
|
59
|
+
val ios: IOSBackgroundLocationStatus?,
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
@Keep
|
|
62
|
+
val lastError: LocationError?
|
|
63
|
+
) {
|
|
64
|
+
/* primary constructor */
|
|
65
|
+
|
|
66
|
+
override fun equals(other: Any?): Boolean {
|
|
67
|
+
if (this === other) return true
|
|
68
|
+
if (other !is BackgroundLocationStatus) return false
|
|
69
|
+
return Objects.deepEquals(this.state, other.state)
|
|
70
|
+
&& Objects.deepEquals(this.isRunning, other.isRunning)
|
|
71
|
+
&& Objects.deepEquals(this.isConfigured, other.isConfigured)
|
|
72
|
+
&& Objects.deepEquals(this.foregroundPermission, other.foregroundPermission)
|
|
73
|
+
&& Objects.deepEquals(this.backgroundPermission, other.backgroundPermission)
|
|
74
|
+
&& Objects.deepEquals(this.accuracyAuthorization, other.accuracyAuthorization)
|
|
75
|
+
&& Objects.deepEquals(this.locationServicesEnabled, other.locationServicesEnabled)
|
|
76
|
+
&& Objects.deepEquals(this.providerStatus, other.providerStatus)
|
|
77
|
+
&& Objects.deepEquals(this.storedLocationCount, other.storedLocationCount)
|
|
78
|
+
&& Objects.deepEquals(this.storedEventCount, other.storedEventCount)
|
|
79
|
+
&& Objects.deepEquals(this.geofenceCount, other.geofenceCount)
|
|
80
|
+
&& Objects.deepEquals(this.android, other.android)
|
|
81
|
+
&& Objects.deepEquals(this.ios, other.ios)
|
|
82
|
+
&& Objects.deepEquals(this.lastError, other.lastError)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
override fun hashCode(): Int {
|
|
86
|
+
return arrayOf(
|
|
87
|
+
state,
|
|
88
|
+
isRunning,
|
|
89
|
+
isConfigured,
|
|
90
|
+
foregroundPermission,
|
|
91
|
+
backgroundPermission,
|
|
92
|
+
accuracyAuthorization,
|
|
93
|
+
locationServicesEnabled,
|
|
94
|
+
providerStatus,
|
|
95
|
+
storedLocationCount,
|
|
96
|
+
storedEventCount,
|
|
97
|
+
geofenceCount,
|
|
98
|
+
android,
|
|
99
|
+
ios,
|
|
100
|
+
lastError
|
|
101
|
+
).contentDeepHashCode()
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
companion object {
|
|
105
|
+
/**
|
|
106
|
+
* Constructor called from C++
|
|
107
|
+
*/
|
|
108
|
+
@DoNotStrip
|
|
109
|
+
@Keep
|
|
110
|
+
@Suppress("unused")
|
|
111
|
+
@JvmStatic
|
|
112
|
+
private fun fromCpp(state: BackgroundLocationState, isRunning: Boolean, isConfigured: Boolean, foregroundPermission: PermissionStatus, backgroundPermission: BackgroundPermissionStatus, accuracyAuthorization: AccuracyAuthorization?, locationServicesEnabled: Boolean, providerStatus: LocationProviderStatus?, storedLocationCount: Double, storedEventCount: Double, geofenceCount: Double, android: AndroidBackgroundLocationStatus?, ios: IOSBackgroundLocationStatus?, lastError: LocationError?): BackgroundLocationStatus {
|
|
113
|
+
return BackgroundLocationStatus(state, isRunning, isConfigured, foregroundPermission, backgroundPermission, accuracyAuthorization, locationServicesEnabled, providerStatus, storedLocationCount, storedEventCount, geofenceCount, android, ios, lastError)
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundPermissionResult.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 "BackgroundPermissionResult".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundPermissionResult(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val foreground: PermissionStatus,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val background: BackgroundPermissionStatus,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val accuracyAuthorization: AccuracyAuthorization?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val canRequestBackgroundInline: Boolean?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val needsSettingsRedirect: Boolean?
|
|
36
|
+
) {
|
|
37
|
+
/* primary constructor */
|
|
38
|
+
|
|
39
|
+
override fun equals(other: Any?): Boolean {
|
|
40
|
+
if (this === other) return true
|
|
41
|
+
if (other !is BackgroundPermissionResult) return false
|
|
42
|
+
return Objects.deepEquals(this.foreground, other.foreground)
|
|
43
|
+
&& Objects.deepEquals(this.background, other.background)
|
|
44
|
+
&& Objects.deepEquals(this.accuracyAuthorization, other.accuracyAuthorization)
|
|
45
|
+
&& Objects.deepEquals(this.canRequestBackgroundInline, other.canRequestBackgroundInline)
|
|
46
|
+
&& Objects.deepEquals(this.needsSettingsRedirect, other.needsSettingsRedirect)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun hashCode(): Int {
|
|
50
|
+
return arrayOf(
|
|
51
|
+
foreground,
|
|
52
|
+
background,
|
|
53
|
+
accuracyAuthorization,
|
|
54
|
+
canRequestBackgroundInline,
|
|
55
|
+
needsSettingsRedirect
|
|
56
|
+
).contentDeepHashCode()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
companion object {
|
|
60
|
+
/**
|
|
61
|
+
* Constructor called from C++
|
|
62
|
+
*/
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
@Suppress("unused")
|
|
66
|
+
@JvmStatic
|
|
67
|
+
private fun fromCpp(foreground: PermissionStatus, background: BackgroundPermissionStatus, accuracyAuthorization: AccuracyAuthorization?, canRequestBackgroundInline: Boolean?, needsSettingsRedirect: Boolean?): BackgroundPermissionResult {
|
|
68
|
+
return BackgroundPermissionResult(foreground, background, accuracyAuthorization, canRequestBackgroundInline, needsSettingsRedirect)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundPermissionStatus.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 "BackgroundPermissionStatus".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BackgroundPermissionStatus(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
GRANTED(0),
|
|
20
|
+
DENIED(1),
|
|
21
|
+
RESTRICTED(2),
|
|
22
|
+
UNDETERMINED(3);
|
|
23
|
+
|
|
24
|
+
companion object
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundTrackingMode.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 "BackgroundTrackingMode".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BackgroundTrackingMode(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
CONTINUOUS(0),
|
|
20
|
+
SIGNIFICANTCHANGES(1),
|
|
21
|
+
ACTIVITYAWARE(2);
|
|
22
|
+
|
|
23
|
+
companion object
|
|
24
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BatterySnapshot.kt
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BatterySnapshot.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 "BatterySnapshot".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BatterySnapshot(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val level: Double?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val isCharging: Boolean?
|
|
27
|
+
) {
|
|
28
|
+
/* primary constructor */
|
|
29
|
+
|
|
30
|
+
override fun equals(other: Any?): Boolean {
|
|
31
|
+
if (this === other) return true
|
|
32
|
+
if (other !is BatterySnapshot) return false
|
|
33
|
+
return Objects.deepEquals(this.level, other.level)
|
|
34
|
+
&& Objects.deepEquals(this.isCharging, other.isCharging)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override fun hashCode(): Int {
|
|
38
|
+
return arrayOf(
|
|
39
|
+
level,
|
|
40
|
+
isCharging
|
|
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(level: Double?, isCharging: Boolean?): BatterySnapshot {
|
|
53
|
+
return BatterySnapshot(level, isCharging)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|