react-native-nitro-geolocation 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +316 -0
- package/android/build.gradle +6 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidAccuracy.kt +105 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidHeadingManager.kt +313 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidLocationSettings.kt +313 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/GetCurrentPosition.kt +46 -45
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/LocationMetadata.kt +26 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/LocationValues.kt +31 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocation.kt +1025 -140
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocationCompat.kt +11 -11
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/RequestAuthorization.kt +6 -6
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/WatchPosition.kt +46 -45
- package/ios/CLLocation+GeolocationMetadata.swift +32 -0
- package/ios/LocationManager.swift +205 -51
- package/ios/NitroGeolocation.swift +949 -110
- package/ios/NitroGeolocationCompat.swift +7 -7
- package/nitrogen/generated/android/c++/JAccuracyAuthorization.hpp +61 -0
- package/nitrogen/generated/android/c++/JAndroidAccuracyPreset.hpp +64 -0
- package/nitrogen/generated/android/c++/JAndroidGranularity.hpp +61 -0
- package/nitrogen/generated/android/c++/{JRNConfigurationInternal.hpp → JCompatGeolocationConfigurationInternal.hpp} +10 -10
- package/nitrogen/generated/android/c++/{JGeolocationError.hpp → JCompatGeolocationError.hpp} +10 -10
- package/nitrogen/generated/android/c++/JCompatGeolocationOptions.hpp +105 -0
- package/nitrogen/generated/android/c++/JCompatGeolocationResponse.hpp +67 -0
- package/nitrogen/generated/android/c++/JFunc_void_AccuracyAuthorization.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_CompatGeolocationError.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_CompatGeolocationResponse.hpp +84 -0
- package/nitrogen/generated/android/c++/JFunc_void_GeolocationResponse.hpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_Heading.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_LocationProviderStatus.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_PermissionStatus.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_GeocodedLocation_.hpp +97 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_ReverseGeocodedAddress_.hpp +98 -0
- package/nitrogen/generated/android/c++/JGeocodedLocation.hpp +65 -0
- package/nitrogen/generated/android/c++/JGeocodingCoordinates.hpp +61 -0
- package/nitrogen/generated/android/c++/{JModernGeolocationConfiguration.hpp → JGeolocationConfiguration.hpp} +10 -10
- package/nitrogen/generated/android/c++/JGeolocationResponse.hpp +13 -3
- package/nitrogen/generated/android/c++/JHeading.hpp +69 -0
- package/nitrogen/generated/android/c++/JHeadingOptions.hpp +57 -0
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.cpp +46 -30
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.hpp +4 -4
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.cpp +169 -33
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.hpp +14 -3
- package/nitrogen/generated/android/c++/JIOSAccuracyPreset.hpp +73 -0
- package/nitrogen/generated/android/c++/JIOSActivityType.hpp +67 -0
- package/nitrogen/generated/android/c++/JLocationAccuracyOptions.hpp +65 -0
- package/nitrogen/generated/android/c++/JLocationAvailability.hpp +62 -0
- package/nitrogen/generated/android/c++/JLocationProviderStatus.hpp +77 -0
- package/nitrogen/generated/android/c++/JLocationProviderUsed.hpp +67 -0
- package/nitrogen/generated/android/c++/JLocationRequestOptions.hpp +49 -3
- package/nitrogen/generated/android/c++/{JGeolocationOptions.hpp → JLocationSettingsOptions.hpp} +28 -22
- package/nitrogen/generated/android/c++/JReverseGeocodedAddress.hpp +82 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AccuracyAuthorization.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidAccuracyPreset.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidGranularity.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{RNConfigurationInternal.kt → CompatGeolocationConfigurationInternal.kt} +5 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{GeolocationError.kt → CompatGeolocationError.kt} +5 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationOptions.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationResponse.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_AccuracyAuthorization.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{Func_void_GeolocationError.kt → Func_void_CompatGeolocationError.kt} +9 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_CompatGeolocationResponse.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_Heading.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_LocationProviderStatus.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_PermissionStatus.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_std__vector_GeocodedLocation_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_std__vector_ReverseGeocodedAddress_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodedLocation.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodingCoordinates.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{ModernGeolocationConfiguration.kt → GeolocationConfiguration.kt} +5 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationResponse.kt +9 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Heading.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HeadingOptions.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationCompatSpec.kt +7 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationSpec.kt +92 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSAccuracyPreset.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSActivityType.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAccuracyOptions.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAvailability.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderStatus.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderUsed.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationRequestOptions.kt +30 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{GeolocationOptions.kt → LocationSettingsOptions.kt} +11 -11
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ReverseGeocodedAddress.kt +56 -0
- package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +18 -4
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.cpp +76 -12
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +519 -77
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Umbrella.hpp +61 -12
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationCompatSpecSwift.hpp +28 -16
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationSpecSwift.hpp +131 -13
- package/nitrogen/generated/ios/swift/AccuracyAuthorization.swift +44 -0
- package/nitrogen/generated/ios/swift/AndroidAccuracyPreset.swift +48 -0
- package/nitrogen/generated/ios/swift/AndroidGranularity.swift +44 -0
- package/nitrogen/generated/ios/swift/{RNConfigurationInternal.swift → CompatGeolocationConfigurationInternal.swift} +5 -5
- package/nitrogen/generated/ios/swift/{GeolocationError.swift → CompatGeolocationError.swift} +5 -5
- package/nitrogen/generated/ios/swift/CompatGeolocationOptions.swift +208 -0
- package/nitrogen/generated/ios/swift/CompatGeolocationResponse.swift +34 -0
- package/nitrogen/generated/ios/swift/Func_void_AccuracyAuthorization.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_CompatGeolocationError.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_CompatGeolocationResponse.swift +46 -0
- package/nitrogen/generated/ios/swift/{Func_void_GeolocationError.swift → Func_void_Heading.swift} +11 -11
- package/nitrogen/generated/ios/swift/Func_void_LocationAvailability.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_LocationProviderStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_GeocodedLocation_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_ReverseGeocodedAddress_.swift +46 -0
- package/nitrogen/generated/ios/swift/GeocodedLocation.swift +52 -0
- package/nitrogen/generated/ios/swift/GeocodingCoordinates.swift +34 -0
- package/nitrogen/generated/ios/swift/{ModernGeolocationConfiguration.swift → GeolocationConfiguration.swift} +5 -5
- package/nitrogen/generated/ios/swift/GeolocationResponse.swift +31 -2
- package/nitrogen/generated/ios/swift/Heading.swift +70 -0
- package/nitrogen/generated/ios/swift/HeadingOptions.swift +42 -0
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec.swift +4 -4
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec_cxx.swift +28 -28
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec.swift +14 -3
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec_cxx.swift +318 -15
- package/nitrogen/generated/ios/swift/IOSAccuracyPreset.swift +60 -0
- package/nitrogen/generated/ios/swift/IOSActivityType.swift +52 -0
- package/nitrogen/generated/ios/swift/LocationAccuracyOptions.swift +46 -0
- package/nitrogen/generated/ios/swift/LocationAvailability.swift +47 -0
- package/nitrogen/generated/ios/swift/LocationProviderStatus.swift +106 -0
- package/nitrogen/generated/ios/swift/LocationProviderUsed.swift +52 -0
- package/nitrogen/generated/ios/swift/LocationRequestOptions.swift +142 -1
- package/nitrogen/generated/ios/swift/{GeolocationOptions.swift → LocationSettingsOptions.swift} +39 -46
- package/nitrogen/generated/ios/swift/ReverseGeocodedAddress.swift +150 -0
- package/nitrogen/generated/shared/c++/AccuracyAuthorization.hpp +80 -0
- package/nitrogen/generated/shared/c++/AndroidAccuracyPreset.hpp +84 -0
- package/nitrogen/generated/shared/c++/AndroidGranularity.hpp +80 -0
- package/nitrogen/generated/shared/c++/{RNConfigurationInternal.hpp → CompatGeolocationConfigurationInternal.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{GeolocationError.hpp → CompatGeolocationError.hpp} +11 -11
- package/nitrogen/generated/shared/c++/CompatGeolocationOptions.hpp +128 -0
- package/nitrogen/generated/shared/c++/CompatGeolocationResponse.hpp +88 -0
- package/nitrogen/generated/shared/c++/GeocodedLocation.hpp +91 -0
- package/nitrogen/generated/shared/c++/GeocodingCoordinates.hpp +87 -0
- package/nitrogen/generated/shared/c++/{ModernGeolocationConfiguration.hpp → GeolocationConfiguration.hpp} +11 -11
- package/nitrogen/generated/shared/c++/GeolocationResponse.hpp +14 -2
- package/nitrogen/generated/shared/c++/Heading.hpp +95 -0
- package/nitrogen/generated/shared/c++/HeadingOptions.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationCompatSpec.hpp +16 -16
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.cpp +11 -0
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.hpp +51 -12
- package/nitrogen/generated/shared/c++/IOSAccuracyPreset.hpp +96 -0
- package/nitrogen/generated/shared/c++/IOSActivityType.hpp +88 -0
- package/nitrogen/generated/shared/c++/LocationAccuracyOptions.hpp +92 -0
- package/nitrogen/generated/shared/c++/LocationAvailability.hpp +88 -0
- package/nitrogen/generated/shared/c++/LocationProviderStatus.hpp +103 -0
- package/nitrogen/generated/shared/c++/LocationProviderUsed.hpp +88 -0
- package/nitrogen/generated/shared/c++/LocationRequestOptions.hpp +47 -3
- package/nitrogen/generated/shared/c++/{GeolocationOptions.hpp → LocationSettingsOptions.hpp} +26 -24
- package/nitrogen/generated/shared/c++/ReverseGeocodedAddress.hpp +108 -0
- package/package.json +1 -1
- package/src/NitroGeolocation.nitro.ts +291 -17
- package/src/NitroGeolocationCompat.nitro.ts +12 -12
- package/src/api/geocode.ts +18 -0
- package/src/api/getAccuracyAuthorization.ts +12 -0
- package/src/api/getCurrentPosition.ts +5 -3
- package/src/api/getHeading.ts +13 -0
- package/src/api/getLastKnownPosition.ts +28 -0
- package/src/api/getLocationAvailability.ts +11 -0
- package/src/api/getProviderStatus.ts +16 -0
- package/src/api/hasServicesEnabled.ts +13 -0
- package/src/api/index.ts +11 -0
- package/src/api/requestLocationSettings.ts +29 -0
- package/src/api/requestPermission.ts +3 -1
- package/src/api/requestTemporaryFullAccuracy.ts +21 -0
- package/src/api/reverseGeocode.ts +23 -0
- package/src/api/setConfiguration.ts +8 -4
- package/src/api/watchHeading.ts +19 -0
- package/src/api/watchPosition.ts +2 -2
- package/src/compat/getCurrentPosition.ts +7 -7
- package/src/compat/index.tsx +5 -5
- package/src/compat/requestAuthorization.ts +2 -2
- package/src/compat/setRNConfiguration.ts +7 -5
- package/src/compat/watchPosition.ts +7 -7
- package/src/devtools/getCurrentPosition.ts +5 -3
- package/src/devtools/index.ts +1 -1
- package/src/devtools/watchPosition.ts +6 -7
- package/src/hooks/useWatchPosition.ts +2 -2
- package/src/index.tsx +35 -6
- package/src/publicTypes.ts +96 -0
- package/src/types.ts +113 -37
- package/src/utils/errors.test.ts +65 -0
- package/src/utils/errors.ts +45 -18
- package/src/utils/index.ts +2 -2
- package/src/utils/provider.test.ts +172 -1
- package/src/utils/provider.ts +50 -5
- package/nitrogen/generated/android/c++/JFunc_void_GeolocationError.hpp +0 -78
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodingCoordinates.kt
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// GeocodingCoordinates.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
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "GeocodingCoordinates".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class GeocodingCoordinates(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val latitude: Double,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val longitude: Double
|
|
26
|
+
) {
|
|
27
|
+
/* primary constructor */
|
|
28
|
+
|
|
29
|
+
companion object {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor called from C++
|
|
32
|
+
*/
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
@Suppress("unused")
|
|
36
|
+
@JvmStatic
|
|
37
|
+
private fun fromCpp(latitude: Double, longitude: Double): GeocodingCoordinates {
|
|
38
|
+
return GeocodingCoordinates(latitude, longitude)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// GeolocationConfiguration.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -12,11 +12,11 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Represents the JavaScript object/struct "
|
|
15
|
+
* Represents the JavaScript object/struct "GeolocationConfiguration".
|
|
16
16
|
*/
|
|
17
17
|
@DoNotStrip
|
|
18
18
|
@Keep
|
|
19
|
-
data class
|
|
19
|
+
data class GeolocationConfiguration(
|
|
20
20
|
@DoNotStrip
|
|
21
21
|
@Keep
|
|
22
22
|
val autoRequestPermission: Boolean?,
|
|
@@ -40,8 +40,8 @@ data class ModernGeolocationConfiguration(
|
|
|
40
40
|
@Keep
|
|
41
41
|
@Suppress("unused")
|
|
42
42
|
@JvmStatic
|
|
43
|
-
private fun fromCpp(autoRequestPermission: Boolean?, authorizationLevel: AuthorizationLevel?, enableBackgroundLocationUpdates: Boolean?, locationProvider: LocationProvider?):
|
|
44
|
-
return
|
|
43
|
+
private fun fromCpp(autoRequestPermission: Boolean?, authorizationLevel: AuthorizationLevel?, enableBackgroundLocationUpdates: Boolean?, locationProvider: LocationProvider?): GeolocationConfiguration {
|
|
44
|
+
return GeolocationConfiguration(autoRequestPermission, authorizationLevel, enableBackgroundLocationUpdates, locationProvider)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationResponse.kt
CHANGED
|
@@ -22,7 +22,13 @@ data class GeolocationResponse(
|
|
|
22
22
|
val coords: GeolocationCoordinates,
|
|
23
23
|
@DoNotStrip
|
|
24
24
|
@Keep
|
|
25
|
-
val timestamp: Double
|
|
25
|
+
val timestamp: Double,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val mocked: Boolean?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val provider: LocationProviderUsed?
|
|
26
32
|
) {
|
|
27
33
|
/* primary constructor */
|
|
28
34
|
|
|
@@ -34,8 +40,8 @@ data class GeolocationResponse(
|
|
|
34
40
|
@Keep
|
|
35
41
|
@Suppress("unused")
|
|
36
42
|
@JvmStatic
|
|
37
|
-
private fun fromCpp(coords: GeolocationCoordinates, timestamp: Double): GeolocationResponse {
|
|
38
|
-
return GeolocationResponse(coords, timestamp)
|
|
43
|
+
private fun fromCpp(coords: GeolocationCoordinates, timestamp: Double, mocked: Boolean?, provider: LocationProviderUsed?): GeolocationResponse {
|
|
44
|
+
return GeolocationResponse(coords, timestamp, mocked, provider)
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Heading.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
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "Heading".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class Heading(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val magneticHeading: Double,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val trueHeading: Double?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val accuracy: Double?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val timestamp: Double
|
|
32
|
+
) {
|
|
33
|
+
/* primary constructor */
|
|
34
|
+
|
|
35
|
+
companion object {
|
|
36
|
+
/**
|
|
37
|
+
* Constructor called from C++
|
|
38
|
+
*/
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
@Suppress("unused")
|
|
42
|
+
@JvmStatic
|
|
43
|
+
private fun fromCpp(magneticHeading: Double, trueHeading: Double?, accuracy: Double?, timestamp: Double): Heading {
|
|
44
|
+
return Heading(magneticHeading, trueHeading, accuracy, timestamp)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HeadingOptions.kt
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HeadingOptions.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
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "HeadingOptions".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class HeadingOptions(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val headingFilter: Double?
|
|
23
|
+
) {
|
|
24
|
+
/* primary constructor */
|
|
25
|
+
|
|
26
|
+
companion object {
|
|
27
|
+
/**
|
|
28
|
+
* Constructor called from C++
|
|
29
|
+
*/
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
@Suppress("unused")
|
|
33
|
+
@JvmStatic
|
|
34
|
+
private fun fromCpp(headingFilter: Double?): HeadingOptions {
|
|
35
|
+
return HeadingOptions(headingFilter)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -30,31 +30,31 @@ abstract class HybridNitroGeolocationCompatSpec: HybridObject() {
|
|
|
30
30
|
// Methods
|
|
31
31
|
@DoNotStrip
|
|
32
32
|
@Keep
|
|
33
|
-
abstract fun setRNConfiguration(config:
|
|
33
|
+
abstract fun setRNConfiguration(config: CompatGeolocationConfigurationInternal): Unit
|
|
34
34
|
|
|
35
|
-
abstract fun requestAuthorization(success: (() -> Unit)?, error: ((error:
|
|
35
|
+
abstract fun requestAuthorization(success: (() -> Unit)?, error: ((error: CompatGeolocationError) -> Unit)?): Unit
|
|
36
36
|
|
|
37
37
|
@DoNotStrip
|
|
38
38
|
@Keep
|
|
39
|
-
private fun requestAuthorization_cxx(success: Func_void?, error:
|
|
39
|
+
private fun requestAuthorization_cxx(success: Func_void?, error: Func_void_CompatGeolocationError?): Unit {
|
|
40
40
|
val __result = requestAuthorization(success?.let { it }, error?.let { it })
|
|
41
41
|
return __result
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
abstract fun getCurrentPosition(success: (position:
|
|
44
|
+
abstract fun getCurrentPosition(success: (position: CompatGeolocationResponse) -> Unit, error: ((error: CompatGeolocationError) -> Unit)?, options: CompatGeolocationOptions?): Unit
|
|
45
45
|
|
|
46
46
|
@DoNotStrip
|
|
47
47
|
@Keep
|
|
48
|
-
private fun getCurrentPosition_cxx(success:
|
|
48
|
+
private fun getCurrentPosition_cxx(success: Func_void_CompatGeolocationResponse, error: Func_void_CompatGeolocationError?, options: CompatGeolocationOptions?): Unit {
|
|
49
49
|
val __result = getCurrentPosition(success, error?.let { it }, options)
|
|
50
50
|
return __result
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
abstract fun watchPosition(success: (position:
|
|
53
|
+
abstract fun watchPosition(success: (position: CompatGeolocationResponse) -> Unit, error: ((error: CompatGeolocationError) -> Unit)?, options: CompatGeolocationOptions?): Double
|
|
54
54
|
|
|
55
55
|
@DoNotStrip
|
|
56
56
|
@Keep
|
|
57
|
-
private fun watchPosition_cxx(success:
|
|
57
|
+
private fun watchPosition_cxx(success: Func_void_CompatGeolocationResponse, error: Func_void_CompatGeolocationError?, options: CompatGeolocationOptions?): Double {
|
|
58
58
|
val __result = watchPosition(success, error?.let { it }, options)
|
|
59
59
|
return __result
|
|
60
60
|
}
|
|
@@ -31,19 +31,108 @@ abstract class HybridNitroGeolocationSpec: HybridObject() {
|
|
|
31
31
|
// Methods
|
|
32
32
|
@DoNotStrip
|
|
33
33
|
@Keep
|
|
34
|
-
abstract fun setConfiguration(config:
|
|
34
|
+
abstract fun setConfiguration(config: GeolocationConfiguration): Unit
|
|
35
35
|
|
|
36
36
|
@DoNotStrip
|
|
37
37
|
@Keep
|
|
38
38
|
abstract fun checkPermission(): Promise<PermissionStatus>
|
|
39
39
|
|
|
40
|
+
abstract fun requestPermission(success: (status: PermissionStatus) -> Unit, error: ((error: LocationError) -> Unit)?): Unit
|
|
41
|
+
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
private fun requestPermission_cxx(success: Func_void_PermissionStatus, error: Func_void_LocationError?): Unit {
|
|
45
|
+
val __result = requestPermission(success, error?.let { it })
|
|
46
|
+
return __result
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@DoNotStrip
|
|
50
|
+
@Keep
|
|
51
|
+
abstract fun hasServicesEnabled(): Promise<Boolean>
|
|
52
|
+
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
@Keep
|
|
55
|
+
abstract fun getProviderStatus(): Promise<LocationProviderStatus>
|
|
56
|
+
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
@Keep
|
|
59
|
+
abstract fun getLocationAvailability(): Promise<LocationAvailability>
|
|
60
|
+
|
|
61
|
+
abstract fun requestLocationSettings(success: (status: LocationProviderStatus) -> Unit, error: ((error: LocationError) -> Unit)?, options: LocationSettingsOptions?): Unit
|
|
62
|
+
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
private fun requestLocationSettings_cxx(success: Func_void_LocationProviderStatus, error: Func_void_LocationError?, options: LocationSettingsOptions?): Unit {
|
|
66
|
+
val __result = requestLocationSettings(success, error?.let { it }, options)
|
|
67
|
+
return __result
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@DoNotStrip
|
|
71
|
+
@Keep
|
|
72
|
+
abstract fun getAccuracyAuthorization(): Promise<AccuracyAuthorization>
|
|
73
|
+
|
|
74
|
+
abstract fun requestTemporaryFullAccuracy(purposeKey: String, success: (authorization: AccuracyAuthorization) -> Unit, error: ((error: LocationError) -> Unit)?): Unit
|
|
75
|
+
|
|
76
|
+
@DoNotStrip
|
|
77
|
+
@Keep
|
|
78
|
+
private fun requestTemporaryFullAccuracy_cxx(purposeKey: String, success: Func_void_AccuracyAuthorization, error: Func_void_LocationError?): Unit {
|
|
79
|
+
val __result = requestTemporaryFullAccuracy(purposeKey, success, error?.let { it })
|
|
80
|
+
return __result
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
abstract fun getCurrentPosition(success: (position: GeolocationResponse) -> Unit, error: ((error: LocationError) -> Unit)?, options: LocationRequestOptions?): Unit
|
|
84
|
+
|
|
85
|
+
@DoNotStrip
|
|
86
|
+
@Keep
|
|
87
|
+
private fun getCurrentPosition_cxx(success: Func_void_GeolocationResponse, error: Func_void_LocationError?, options: LocationRequestOptions?): Unit {
|
|
88
|
+
val __result = getCurrentPosition(success, error?.let { it }, options)
|
|
89
|
+
return __result
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
abstract fun getLastKnownPosition(success: (position: GeolocationResponse) -> Unit, error: ((error: LocationError) -> Unit)?, options: LocationRequestOptions?): Unit
|
|
93
|
+
|
|
94
|
+
@DoNotStrip
|
|
95
|
+
@Keep
|
|
96
|
+
private fun getLastKnownPosition_cxx(success: Func_void_GeolocationResponse, error: Func_void_LocationError?, options: LocationRequestOptions?): Unit {
|
|
97
|
+
val __result = getLastKnownPosition(success, error?.let { it }, options)
|
|
98
|
+
return __result
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
abstract fun geocode(address: String, success: (locations: Array<GeocodedLocation>) -> Unit, error: ((error: LocationError) -> Unit)?): Unit
|
|
102
|
+
|
|
103
|
+
@DoNotStrip
|
|
104
|
+
@Keep
|
|
105
|
+
private fun geocode_cxx(address: String, success: Func_void_std__vector_GeocodedLocation_, error: Func_void_LocationError?): Unit {
|
|
106
|
+
val __result = geocode(address, success, error?.let { it })
|
|
107
|
+
return __result
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
abstract fun reverseGeocode(coords: GeocodingCoordinates, success: (addresses: Array<ReverseGeocodedAddress>) -> Unit, error: ((error: LocationError) -> Unit)?): Unit
|
|
111
|
+
|
|
40
112
|
@DoNotStrip
|
|
41
113
|
@Keep
|
|
42
|
-
|
|
114
|
+
private fun reverseGeocode_cxx(coords: GeocodingCoordinates, success: Func_void_std__vector_ReverseGeocodedAddress_, error: Func_void_LocationError?): Unit {
|
|
115
|
+
val __result = reverseGeocode(coords, success, error?.let { it })
|
|
116
|
+
return __result
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
abstract fun getHeading(success: (heading: Heading) -> Unit, error: ((error: LocationError) -> Unit)?): Unit
|
|
43
120
|
|
|
44
121
|
@DoNotStrip
|
|
45
122
|
@Keep
|
|
46
|
-
|
|
123
|
+
private fun getHeading_cxx(success: Func_void_Heading, error: Func_void_LocationError?): Unit {
|
|
124
|
+
val __result = getHeading(success, error?.let { it })
|
|
125
|
+
return __result
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
abstract fun watchHeading(success: (heading: Heading) -> Unit, error: ((error: LocationError) -> Unit)?, options: HeadingOptions?): String
|
|
129
|
+
|
|
130
|
+
@DoNotStrip
|
|
131
|
+
@Keep
|
|
132
|
+
private fun watchHeading_cxx(success: Func_void_Heading, error: Func_void_LocationError?, options: HeadingOptions?): String {
|
|
133
|
+
val __result = watchHeading(success, error?.let { it }, options)
|
|
134
|
+
return __result
|
|
135
|
+
}
|
|
47
136
|
|
|
48
137
|
abstract fun watchPosition(success: (position: GeolocationResponse) -> Unit, error: ((error: LocationError) -> Unit)?, options: LocationRequestOptions?): String
|
|
49
138
|
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSAccuracyPreset.kt
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// IOSAccuracyPreset.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 "IOSAccuracyPreset".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class IOSAccuracyPreset(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
BESTFORNAVIGATION(0),
|
|
20
|
+
BEST(1),
|
|
21
|
+
NEARESTTENMETERS(2),
|
|
22
|
+
HUNDREDMETERS(3),
|
|
23
|
+
KILOMETER(4),
|
|
24
|
+
THREEKILOMETERS(5),
|
|
25
|
+
REDUCED(6);
|
|
26
|
+
|
|
27
|
+
companion object
|
|
28
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSActivityType.kt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// IOSActivityType.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 "IOSActivityType".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class IOSActivityType(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
OTHER(0),
|
|
20
|
+
AUTOMOTIVENAVIGATION(1),
|
|
21
|
+
FITNESS(2),
|
|
22
|
+
OTHERNAVIGATION(3),
|
|
23
|
+
AIRBORNE(4);
|
|
24
|
+
|
|
25
|
+
companion object
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LocationAccuracyOptions.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
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "LocationAccuracyOptions".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class LocationAccuracyOptions(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val android: AndroidAccuracyPreset?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val ios: IOSAccuracyPreset?
|
|
26
|
+
) {
|
|
27
|
+
/* primary constructor */
|
|
28
|
+
|
|
29
|
+
companion object {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor called from C++
|
|
32
|
+
*/
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
@Suppress("unused")
|
|
36
|
+
@JvmStatic
|
|
37
|
+
private fun fromCpp(android: AndroidAccuracyPreset?, ios: IOSAccuracyPreset?): LocationAccuracyOptions {
|
|
38
|
+
return LocationAccuracyOptions(android, ios)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAvailability.kt
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LocationAvailability.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
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "LocationAvailability".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class LocationAvailability(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val available: Boolean,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val reason: String?
|
|
26
|
+
) {
|
|
27
|
+
/* primary constructor */
|
|
28
|
+
|
|
29
|
+
companion object {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor called from C++
|
|
32
|
+
*/
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
@Suppress("unused")
|
|
36
|
+
@JvmStatic
|
|
37
|
+
private fun fromCpp(available: Boolean, reason: String?): LocationAvailability {
|
|
38
|
+
return LocationAvailability(available, reason)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LocationProviderStatus.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
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "LocationProviderStatus".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class LocationProviderStatus(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val locationServicesEnabled: Boolean,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val backgroundModeEnabled: Boolean,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val gpsAvailable: Boolean?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val networkAvailable: Boolean?,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val passiveAvailable: Boolean?,
|
|
35
|
+
@DoNotStrip
|
|
36
|
+
@Keep
|
|
37
|
+
val googleLocationAccuracyEnabled: Boolean?
|
|
38
|
+
) {
|
|
39
|
+
/* primary constructor */
|
|
40
|
+
|
|
41
|
+
companion object {
|
|
42
|
+
/**
|
|
43
|
+
* Constructor called from C++
|
|
44
|
+
*/
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
@Suppress("unused")
|
|
48
|
+
@JvmStatic
|
|
49
|
+
private fun fromCpp(locationServicesEnabled: Boolean, backgroundModeEnabled: Boolean, gpsAvailable: Boolean?, networkAvailable: Boolean?, passiveAvailable: Boolean?, googleLocationAccuracyEnabled: Boolean?): LocationProviderStatus {
|
|
50
|
+
return LocationProviderStatus(locationServicesEnabled, backgroundModeEnabled, gpsAvailable, networkAvailable, passiveAvailable, googleLocationAccuracyEnabled)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderUsed.kt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LocationProviderUsed.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 "LocationProviderUsed".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class LocationProviderUsed(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
PASSIVE(0),
|
|
20
|
+
UNKNOWN(1),
|
|
21
|
+
FUSED(2),
|
|
22
|
+
GPS(3),
|
|
23
|
+
NETWORK(4);
|
|
24
|
+
|
|
25
|
+
companion object
|
|
26
|
+
}
|
|
@@ -28,6 +28,9 @@ data class LocationRequestOptions(
|
|
|
28
28
|
val enableHighAccuracy: Boolean?,
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
|
+
val accuracy: LocationAccuracyOptions?,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
31
34
|
val interval: Double?,
|
|
32
35
|
@DoNotStrip
|
|
33
36
|
@Keep
|
|
@@ -37,7 +40,31 @@ data class LocationRequestOptions(
|
|
|
37
40
|
val distanceFilter: Double?,
|
|
38
41
|
@DoNotStrip
|
|
39
42
|
@Keep
|
|
40
|
-
val
|
|
43
|
+
val granularity: AndroidGranularity?,
|
|
44
|
+
@DoNotStrip
|
|
45
|
+
@Keep
|
|
46
|
+
val waitForAccurateLocation: Boolean?,
|
|
47
|
+
@DoNotStrip
|
|
48
|
+
@Keep
|
|
49
|
+
val maxUpdateAge: Double?,
|
|
50
|
+
@DoNotStrip
|
|
51
|
+
@Keep
|
|
52
|
+
val maxUpdateDelay: Double?,
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
@Keep
|
|
55
|
+
val maxUpdates: Double?,
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
@Keep
|
|
58
|
+
val useSignificantChanges: Boolean?,
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
@Keep
|
|
61
|
+
val activityType: IOSActivityType?,
|
|
62
|
+
@DoNotStrip
|
|
63
|
+
@Keep
|
|
64
|
+
val pausesLocationUpdatesAutomatically: Boolean?,
|
|
65
|
+
@DoNotStrip
|
|
66
|
+
@Keep
|
|
67
|
+
val showsBackgroundLocationIndicator: Boolean?
|
|
41
68
|
) {
|
|
42
69
|
/* primary constructor */
|
|
43
70
|
|
|
@@ -49,8 +76,8 @@ data class LocationRequestOptions(
|
|
|
49
76
|
@Keep
|
|
50
77
|
@Suppress("unused")
|
|
51
78
|
@JvmStatic
|
|
52
|
-
private fun fromCpp(timeout: Double?, maximumAge: Double?, enableHighAccuracy: Boolean?, interval: Double?, fastestInterval: Double?, distanceFilter: Double?, useSignificantChanges: Boolean?): LocationRequestOptions {
|
|
53
|
-
return LocationRequestOptions(timeout, maximumAge, enableHighAccuracy, interval, fastestInterval, distanceFilter, useSignificantChanges)
|
|
79
|
+
private fun fromCpp(timeout: Double?, maximumAge: Double?, enableHighAccuracy: Boolean?, accuracy: LocationAccuracyOptions?, interval: Double?, fastestInterval: Double?, distanceFilter: Double?, granularity: AndroidGranularity?, waitForAccurateLocation: Boolean?, maxUpdateAge: Double?, maxUpdateDelay: Double?, maxUpdates: Double?, useSignificantChanges: Boolean?, activityType: IOSActivityType?, pausesLocationUpdatesAutomatically: Boolean?, showsBackgroundLocationIndicator: Boolean?): LocationRequestOptions {
|
|
80
|
+
return LocationRequestOptions(timeout, maximumAge, enableHighAccuracy, accuracy, interval, fastestInterval, distanceFilter, granularity, waitForAccurateLocation, maxUpdateAge, maxUpdateDelay, maxUpdates, useSignificantChanges, activityType, pausesLocationUpdatesAutomatically, showsBackgroundLocationIndicator)
|
|
54
81
|
}
|
|
55
82
|
}
|
|
56
83
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// LocationSettingsOptions.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -12,20 +12,17 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Represents the JavaScript object/struct "
|
|
15
|
+
* Represents the JavaScript object/struct "LocationSettingsOptions".
|
|
16
16
|
*/
|
|
17
17
|
@DoNotStrip
|
|
18
18
|
@Keep
|
|
19
|
-
data class
|
|
19
|
+
data class LocationSettingsOptions(
|
|
20
20
|
@DoNotStrip
|
|
21
21
|
@Keep
|
|
22
|
-
val
|
|
23
|
-
@DoNotStrip
|
|
24
|
-
@Keep
|
|
25
|
-
val maximumAge: Double?,
|
|
22
|
+
val enableHighAccuracy: Boolean?,
|
|
26
23
|
@DoNotStrip
|
|
27
24
|
@Keep
|
|
28
|
-
val
|
|
25
|
+
val accuracy: LocationAccuracyOptions?,
|
|
29
26
|
@DoNotStrip
|
|
30
27
|
@Keep
|
|
31
28
|
val interval: Double?,
|
|
@@ -37,7 +34,10 @@ data class GeolocationOptions(
|
|
|
37
34
|
val distanceFilter: Double?,
|
|
38
35
|
@DoNotStrip
|
|
39
36
|
@Keep
|
|
40
|
-
val
|
|
37
|
+
val alwaysShow: Boolean?,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
40
|
+
val needBle: Boolean?
|
|
41
41
|
) {
|
|
42
42
|
/* primary constructor */
|
|
43
43
|
|
|
@@ -49,8 +49,8 @@ data class GeolocationOptions(
|
|
|
49
49
|
@Keep
|
|
50
50
|
@Suppress("unused")
|
|
51
51
|
@JvmStatic
|
|
52
|
-
private fun fromCpp(
|
|
53
|
-
return
|
|
52
|
+
private fun fromCpp(enableHighAccuracy: Boolean?, accuracy: LocationAccuracyOptions?, interval: Double?, fastestInterval: Double?, distanceFilter: Double?, alwaysShow: Boolean?, needBle: Boolean?): LocationSettingsOptions {
|
|
53
|
+
return LocationSettingsOptions(enableHighAccuracy, accuracy, interval, fastestInterval, distanceFilter, alwaysShow, needBle)
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|