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,100 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_NullType_Boolean_String_Double.hpp
|
|
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
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <variant>
|
|
12
|
+
|
|
13
|
+
#include <NitroModules/Null.hpp>
|
|
14
|
+
#include <string>
|
|
15
|
+
#include <variant>
|
|
16
|
+
#include <NitroModules/JNull.hpp>
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::nitrogeolocation {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_NullType_Boolean_String_Double".
|
|
24
|
+
*/
|
|
25
|
+
class JVariant_NullType_Boolean_String_Double: public jni::JavaClass<JVariant_NullType_Boolean_String_Double> {
|
|
26
|
+
public:
|
|
27
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double;";
|
|
28
|
+
|
|
29
|
+
static jni::local_ref<JVariant_NullType_Boolean_String_Double> create_0(jni::alias_ref<JNull> value) {
|
|
30
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_Boolean_String_Double(jni::alias_ref<JNull>)>("create");
|
|
31
|
+
return method(javaClassStatic(), value);
|
|
32
|
+
}
|
|
33
|
+
static jni::local_ref<JVariant_NullType_Boolean_String_Double> create_1(jboolean value) {
|
|
34
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_Boolean_String_Double(jboolean)>("create");
|
|
35
|
+
return method(javaClassStatic(), value);
|
|
36
|
+
}
|
|
37
|
+
static jni::local_ref<JVariant_NullType_Boolean_String_Double> create_2(jni::alias_ref<jni::JString> value) {
|
|
38
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_Boolean_String_Double(jni::alias_ref<jni::JString>)>("create");
|
|
39
|
+
return method(javaClassStatic(), value);
|
|
40
|
+
}
|
|
41
|
+
static jni::local_ref<JVariant_NullType_Boolean_String_Double> create_3(double value) {
|
|
42
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_Boolean_String_Double(double)>("create");
|
|
43
|
+
return method(javaClassStatic(), value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static jni::local_ref<JVariant_NullType_Boolean_String_Double> fromCpp(const std::variant<nitro::NullType, bool, std::string, double>& variant) {
|
|
47
|
+
switch (variant.index()) {
|
|
48
|
+
case 0: return create_0(JNull::null());
|
|
49
|
+
case 1: return create_1(std::get<1>(variant));
|
|
50
|
+
case 2: return create_2(jni::make_jstring(std::get<2>(variant)));
|
|
51
|
+
case 3: return create_3(std::get<3>(variant));
|
|
52
|
+
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[[nodiscard]] std::variant<nitro::NullType, bool, std::string, double> toCpp() const;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
namespace JVariant_NullType_Boolean_String_Double_impl {
|
|
60
|
+
class First final: public jni::JavaClass<First, JVariant_NullType_Boolean_String_Double> {
|
|
61
|
+
public:
|
|
62
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double$First;";
|
|
63
|
+
|
|
64
|
+
[[nodiscard]] jni::local_ref<JNull> getValue() const {
|
|
65
|
+
static const auto field = javaClassStatic()->getField<JNull>("value");
|
|
66
|
+
return getFieldValue(field);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
class Second final: public jni::JavaClass<Second, JVariant_NullType_Boolean_String_Double> {
|
|
71
|
+
public:
|
|
72
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double$Second;";
|
|
73
|
+
|
|
74
|
+
[[nodiscard]] jboolean getValue() const {
|
|
75
|
+
static const auto field = javaClassStatic()->getField<jboolean>("value");
|
|
76
|
+
return getFieldValue(field);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
class Third final: public jni::JavaClass<Third, JVariant_NullType_Boolean_String_Double> {
|
|
81
|
+
public:
|
|
82
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double$Third;";
|
|
83
|
+
|
|
84
|
+
[[nodiscard]] jni::local_ref<jni::JString> getValue() const {
|
|
85
|
+
static const auto field = javaClassStatic()->getField<jni::JString>("value");
|
|
86
|
+
return getFieldValue(field);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
class Fourth final: public jni::JavaClass<Fourth, JVariant_NullType_Boolean_String_Double> {
|
|
91
|
+
public:
|
|
92
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double$Fourth;";
|
|
93
|
+
|
|
94
|
+
[[nodiscard]] double getValue() const {
|
|
95
|
+
static const auto field = javaClassStatic()->getField<double>("value");
|
|
96
|
+
return getFieldValue(field);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
} // namespace JVariant_NullType_Boolean_String_Double_impl
|
|
100
|
+
} // namespace margelo::nitro::nitrogeolocation
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ActivityRecognitionOptions.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 "ActivityRecognitionOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class ActivityRecognitionOptions(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val enabled: Boolean?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val interval: Double?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val stopOnStill: Boolean?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val minimumConfidence: Double?
|
|
33
|
+
) {
|
|
34
|
+
/* primary constructor */
|
|
35
|
+
|
|
36
|
+
override fun equals(other: Any?): Boolean {
|
|
37
|
+
if (this === other) return true
|
|
38
|
+
if (other !is ActivityRecognitionOptions) return false
|
|
39
|
+
return Objects.deepEquals(this.enabled, other.enabled)
|
|
40
|
+
&& Objects.deepEquals(this.interval, other.interval)
|
|
41
|
+
&& Objects.deepEquals(this.stopOnStill, other.stopOnStill)
|
|
42
|
+
&& Objects.deepEquals(this.minimumConfidence, other.minimumConfidence)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override fun hashCode(): Int {
|
|
46
|
+
return arrayOf(
|
|
47
|
+
enabled,
|
|
48
|
+
interval,
|
|
49
|
+
stopOnStill,
|
|
50
|
+
minimumConfidence
|
|
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(enabled: Boolean?, interval: Double?, stopOnStill: Boolean?, minimumConfidence: Double?): ActivityRecognitionOptions {
|
|
63
|
+
return ActivityRecognitionOptions(enabled, interval, stopOnStill, minimumConfidence)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AndroidBackgroundLocationOptions.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 "AndroidBackgroundLocationOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class AndroidBackgroundLocationOptions(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val locationProvider: AndroidBackgroundProvider?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val foregroundService: AndroidForegroundServiceOptions,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val requestNotificationPermission: Boolean?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val requestIgnoreBatteryOptimizations: Boolean?
|
|
33
|
+
) {
|
|
34
|
+
/* primary constructor */
|
|
35
|
+
|
|
36
|
+
override fun equals(other: Any?): Boolean {
|
|
37
|
+
if (this === other) return true
|
|
38
|
+
if (other !is AndroidBackgroundLocationOptions) return false
|
|
39
|
+
return Objects.deepEquals(this.locationProvider, other.locationProvider)
|
|
40
|
+
&& Objects.deepEquals(this.foregroundService, other.foregroundService)
|
|
41
|
+
&& Objects.deepEquals(this.requestNotificationPermission, other.requestNotificationPermission)
|
|
42
|
+
&& Objects.deepEquals(this.requestIgnoreBatteryOptimizations, other.requestIgnoreBatteryOptimizations)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override fun hashCode(): Int {
|
|
46
|
+
return arrayOf(
|
|
47
|
+
locationProvider,
|
|
48
|
+
foregroundService,
|
|
49
|
+
requestNotificationPermission,
|
|
50
|
+
requestIgnoreBatteryOptimizations
|
|
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(locationProvider: AndroidBackgroundProvider?, foregroundService: AndroidForegroundServiceOptions, requestNotificationPermission: Boolean?, requestIgnoreBatteryOptimizations: Boolean?): AndroidBackgroundLocationOptions {
|
|
63
|
+
return AndroidBackgroundLocationOptions(locationProvider, foregroundService, requestNotificationPermission, requestIgnoreBatteryOptimizations)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AndroidBackgroundLocationStatus.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 "AndroidBackgroundLocationStatus".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class AndroidBackgroundLocationStatus(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val isForegroundServiceRunning: Boolean,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val isIgnoringBatteryOptimizations: Boolean?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val notificationPermission: PermissionStatus?
|
|
30
|
+
) {
|
|
31
|
+
/* primary constructor */
|
|
32
|
+
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is AndroidBackgroundLocationStatus) return false
|
|
36
|
+
return Objects.deepEquals(this.isForegroundServiceRunning, other.isForegroundServiceRunning)
|
|
37
|
+
&& Objects.deepEquals(this.isIgnoringBatteryOptimizations, other.isIgnoringBatteryOptimizations)
|
|
38
|
+
&& Objects.deepEquals(this.notificationPermission, other.notificationPermission)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf(
|
|
43
|
+
isForegroundServiceRunning,
|
|
44
|
+
isIgnoringBatteryOptimizations,
|
|
45
|
+
notificationPermission
|
|
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(isForegroundServiceRunning: Boolean, isIgnoringBatteryOptimizations: Boolean?, notificationPermission: PermissionStatus?): AndroidBackgroundLocationStatus {
|
|
58
|
+
return AndroidBackgroundLocationStatus(isForegroundServiceRunning, isIgnoringBatteryOptimizations, notificationPermission)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AndroidBackgroundProvider.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 "AndroidBackgroundProvider".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class AndroidBackgroundProvider(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
AUTO(0),
|
|
20
|
+
PLAYSERVICES(1),
|
|
21
|
+
ANDROID_PLATFORM(2);
|
|
22
|
+
|
|
23
|
+
companion object
|
|
24
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AndroidForegroundServiceOptions.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 "AndroidForegroundServiceOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class AndroidForegroundServiceOptions(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val notificationId: Double?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val notificationTitle: String,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val notificationText: String,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val notificationChannelId: String?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val notificationChannelName: String?,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val notificationChannelDescription: String?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val notificationIcon: String?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val notificationColor: String?,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val stopActionTitle: String?
|
|
48
|
+
) {
|
|
49
|
+
/* primary constructor */
|
|
50
|
+
|
|
51
|
+
override fun equals(other: Any?): Boolean {
|
|
52
|
+
if (this === other) return true
|
|
53
|
+
if (other !is AndroidForegroundServiceOptions) return false
|
|
54
|
+
return Objects.deepEquals(this.notificationId, other.notificationId)
|
|
55
|
+
&& Objects.deepEquals(this.notificationTitle, other.notificationTitle)
|
|
56
|
+
&& Objects.deepEquals(this.notificationText, other.notificationText)
|
|
57
|
+
&& Objects.deepEquals(this.notificationChannelId, other.notificationChannelId)
|
|
58
|
+
&& Objects.deepEquals(this.notificationChannelName, other.notificationChannelName)
|
|
59
|
+
&& Objects.deepEquals(this.notificationChannelDescription, other.notificationChannelDescription)
|
|
60
|
+
&& Objects.deepEquals(this.notificationIcon, other.notificationIcon)
|
|
61
|
+
&& Objects.deepEquals(this.notificationColor, other.notificationColor)
|
|
62
|
+
&& Objects.deepEquals(this.stopActionTitle, other.stopActionTitle)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
override fun hashCode(): Int {
|
|
66
|
+
return arrayOf(
|
|
67
|
+
notificationId,
|
|
68
|
+
notificationTitle,
|
|
69
|
+
notificationText,
|
|
70
|
+
notificationChannelId,
|
|
71
|
+
notificationChannelName,
|
|
72
|
+
notificationChannelDescription,
|
|
73
|
+
notificationIcon,
|
|
74
|
+
notificationColor,
|
|
75
|
+
stopActionTitle
|
|
76
|
+
).contentDeepHashCode()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
companion object {
|
|
80
|
+
/**
|
|
81
|
+
* Constructor called from C++
|
|
82
|
+
*/
|
|
83
|
+
@DoNotStrip
|
|
84
|
+
@Keep
|
|
85
|
+
@Suppress("unused")
|
|
86
|
+
@JvmStatic
|
|
87
|
+
private fun fromCpp(notificationId: Double?, notificationTitle: String, notificationText: String, notificationChannelId: String?, notificationChannelName: String?, notificationChannelDescription: String?, notificationIcon: String?, notificationColor: String?, stopActionTitle: String?): AndroidForegroundServiceOptions {
|
|
88
|
+
return AndroidForegroundServiceOptions(notificationId, notificationTitle, notificationText, notificationChannelId, notificationChannelName, notificationChannelDescription, notificationIcon, notificationColor, stopActionTitle)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// 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.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "BackgroundEventEnvelope".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundEventEnvelope(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val location: BackgroundLocation?,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val geofence: GeofenceEvent?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val activity: DetectedActivity?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val providerStatus: LocationProviderStatus?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val result: BackgroundHttpSyncResult?,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val error: LocationError?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val id: String,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val type: BackgroundEventType,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val timestamp: Double,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val deliveredToJS: Boolean
|
|
51
|
+
) {
|
|
52
|
+
/* primary constructor */
|
|
53
|
+
|
|
54
|
+
override fun equals(other: Any?): Boolean {
|
|
55
|
+
if (this === other) return true
|
|
56
|
+
if (other !is BackgroundEventEnvelope) return false
|
|
57
|
+
return Objects.deepEquals(this.location, other.location)
|
|
58
|
+
&& Objects.deepEquals(this.geofence, other.geofence)
|
|
59
|
+
&& Objects.deepEquals(this.activity, other.activity)
|
|
60
|
+
&& Objects.deepEquals(this.providerStatus, other.providerStatus)
|
|
61
|
+
&& Objects.deepEquals(this.result, other.result)
|
|
62
|
+
&& Objects.deepEquals(this.error, other.error)
|
|
63
|
+
&& Objects.deepEquals(this.id, other.id)
|
|
64
|
+
&& Objects.deepEquals(this.type, other.type)
|
|
65
|
+
&& Objects.deepEquals(this.timestamp, other.timestamp)
|
|
66
|
+
&& Objects.deepEquals(this.deliveredToJS, other.deliveredToJS)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
override fun hashCode(): Int {
|
|
70
|
+
return arrayOf(
|
|
71
|
+
location,
|
|
72
|
+
geofence,
|
|
73
|
+
activity,
|
|
74
|
+
providerStatus,
|
|
75
|
+
result,
|
|
76
|
+
error,
|
|
77
|
+
id,
|
|
78
|
+
type,
|
|
79
|
+
timestamp,
|
|
80
|
+
deliveredToJS
|
|
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(location: BackgroundLocation?, geofence: GeofenceEvent?, activity: DetectedActivity?, providerStatus: LocationProviderStatus?, result: BackgroundHttpSyncResult?, error: LocationError?, id: String, type: BackgroundEventType, timestamp: Double, deliveredToJS: Boolean): BackgroundEventEnvelope {
|
|
93
|
+
return BackgroundEventEnvelope(location, geofence, activity, providerStatus, result, error, id, type, timestamp, deliveredToJS)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventType.kt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundEventType.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 "BackgroundEventType".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BackgroundEventType(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
ERROR(0),
|
|
20
|
+
GEOFENCE(1),
|
|
21
|
+
LOCATION(2),
|
|
22
|
+
ACTIVITY(3),
|
|
23
|
+
PROVIDERCHANGE(4),
|
|
24
|
+
HTTPSYNC(5);
|
|
25
|
+
|
|
26
|
+
companion object
|
|
27
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpMethod.kt
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundHttpMethod.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 "BackgroundHttpMethod".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class BackgroundHttpMethod(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
POST(0),
|
|
20
|
+
PUT(1),
|
|
21
|
+
PATCH(2);
|
|
22
|
+
|
|
23
|
+
companion object
|
|
24
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BackgroundHttpSyncOptions.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 "BackgroundHttpSyncOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BackgroundHttpSyncOptions(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val url: String,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val method: BackgroundHttpMethod?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val headers: Map<String, String>?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val batch: Boolean?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val batchSize: Double?,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val syncThreshold: Double?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val syncInterval: Double?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val retry: Boolean?,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val maxRetries: Double?,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val bodyTemplate: Map<String, Variant_NullType_Boolean_String_Double>?,
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
val autoClear: Boolean?
|
|
54
|
+
) {
|
|
55
|
+
/* primary constructor */
|
|
56
|
+
|
|
57
|
+
override fun equals(other: Any?): Boolean {
|
|
58
|
+
if (this === other) return true
|
|
59
|
+
if (other !is BackgroundHttpSyncOptions) return false
|
|
60
|
+
return Objects.deepEquals(this.url, other.url)
|
|
61
|
+
&& Objects.deepEquals(this.method, other.method)
|
|
62
|
+
&& Objects.deepEquals(this.headers, other.headers)
|
|
63
|
+
&& Objects.deepEquals(this.batch, other.batch)
|
|
64
|
+
&& Objects.deepEquals(this.batchSize, other.batchSize)
|
|
65
|
+
&& Objects.deepEquals(this.syncThreshold, other.syncThreshold)
|
|
66
|
+
&& Objects.deepEquals(this.syncInterval, other.syncInterval)
|
|
67
|
+
&& Objects.deepEquals(this.retry, other.retry)
|
|
68
|
+
&& Objects.deepEquals(this.maxRetries, other.maxRetries)
|
|
69
|
+
&& Objects.deepEquals(this.bodyTemplate, other.bodyTemplate)
|
|
70
|
+
&& Objects.deepEquals(this.autoClear, other.autoClear)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
override fun hashCode(): Int {
|
|
74
|
+
return arrayOf(
|
|
75
|
+
url,
|
|
76
|
+
method,
|
|
77
|
+
headers,
|
|
78
|
+
batch,
|
|
79
|
+
batchSize,
|
|
80
|
+
syncThreshold,
|
|
81
|
+
syncInterval,
|
|
82
|
+
retry,
|
|
83
|
+
maxRetries,
|
|
84
|
+
bodyTemplate,
|
|
85
|
+
autoClear
|
|
86
|
+
).contentDeepHashCode()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
companion object {
|
|
90
|
+
/**
|
|
91
|
+
* Constructor called from C++
|
|
92
|
+
*/
|
|
93
|
+
@DoNotStrip
|
|
94
|
+
@Keep
|
|
95
|
+
@Suppress("unused")
|
|
96
|
+
@JvmStatic
|
|
97
|
+
private fun fromCpp(url: String, method: BackgroundHttpMethod?, headers: Map<String, String>?, batch: Boolean?, batchSize: Double?, syncThreshold: Double?, syncInterval: Double?, retry: Boolean?, maxRetries: Double?, bodyTemplate: Map<String, Variant_NullType_Boolean_String_Double>?, autoClear: Boolean?): BackgroundHttpSyncOptions {
|
|
98
|
+
return BackgroundHttpSyncOptions(url, method, headers, batch, batchSize, syncThreshold, syncInterval, retry, maxRetries, bodyTemplate, autoClear)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|