expo-location 58.0.12 → 58.0.13
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/CHANGELOG.md +11 -0
- package/android/build.gradle +2 -2
- package/build/Location.types.d.ts +4 -1
- package/build/Location.types.js.map +1 -1
- package/build/next/Location.d.ts +1 -0
- package/build/next/Location.js +3 -0
- package/build/next/Location.js.map +1 -0
- package/build/next/index.d.ts +3 -0
- package/build/next/index.js +5 -0
- package/build/next/index.js.map +1 -0
- package/build/next/js/LocationProvider.d.ts +9 -0
- package/build/next/js/LocationProvider.js +20 -0
- package/build/next/js/LocationProvider.js.map +1 -0
- package/build/next/js/LocationUpdatesHandle.d.ts +15 -0
- package/build/next/js/LocationUpdatesHandle.js +39 -0
- package/build/next/js/LocationUpdatesHandle.js.map +1 -0
- package/build/next/js/Permissions.d.ts +7 -0
- package/build/next/js/Permissions.js +24 -0
- package/build/next/js/Permissions.js.map +1 -0
- package/build/next/js/PositionWatchHandle.d.ts +16 -0
- package/build/next/js/PositionWatchHandle.js +50 -0
- package/build/next/js/PositionWatchHandle.js.map +1 -0
- package/build/next/js/getPosition.d.ts +2 -0
- package/build/next/js/getPosition.js +6 -0
- package/build/next/js/getPosition.js.map +1 -0
- package/build/next/js/index.d.ts +6 -0
- package/build/next/js/index.js +8 -0
- package/build/next/js/index.js.map +1 -0
- package/build/next/js/locationServices.d.ts +3 -0
- package/build/next/js/locationServices.js +35 -0
- package/build/next/js/locationServices.js.map +1 -0
- package/build/next/native/NativeLocationModuleNext.d.ts +5 -0
- package/build/next/native/NativeLocationModuleNext.js +7 -0
- package/build/next/native/NativeLocationModuleNext.js.map +1 -0
- package/build/next/native/index.d.ts +5 -0
- package/build/next/native/index.js +3 -0
- package/build/next/native/index.js.map +1 -0
- package/build/next/native/types/NativeLocationModuleNextClass.types.d.ts +21 -0
- package/build/next/native/types/NativeLocationModuleNextClass.types.js +3 -0
- package/build/next/native/types/NativeLocationModuleNextClass.types.js.map +1 -0
- package/build/next/native/types/NativeLocationProviderClass.types.d.ts +8 -0
- package/build/next/native/types/NativeLocationProviderClass.types.js +3 -0
- package/build/next/native/types/NativeLocationProviderClass.types.js.map +1 -0
- package/build/next/native/types/NativeLocationUpdatesHandleClass.types.d.ts +8 -0
- package/build/next/native/types/NativeLocationUpdatesHandleClass.types.js +3 -0
- package/build/next/native/types/NativeLocationUpdatesHandleClass.types.js.map +1 -0
- package/build/next/native/types/NativePositionWatchHandleClass.types.d.ts +12 -0
- package/build/next/native/types/NativePositionWatchHandleClass.types.js +3 -0
- package/build/next/native/types/NativePositionWatchHandleClass.types.js.map +1 -0
- package/build/next/types/LocationProvider.types.d.ts +1 -0
- package/build/next/types/LocationProvider.types.js +3 -0
- package/build/next/types/LocationProvider.types.js.map +1 -0
- package/build/next/types/Permissions.types.d.ts +22 -0
- package/build/next/types/Permissions.types.js +19 -0
- package/build/next/types/Permissions.types.js.map +1 -0
- package/build/next/types/Position.types.d.ts +55 -0
- package/build/next/types/Position.types.js +11 -0
- package/build/next/types/Position.types.js.map +1 -0
- package/build/next/types/index.d.ts +3 -0
- package/build/next/types/index.js +5 -0
- package/build/next/types/index.js.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/EXLocation.m +1 -0
- package/ios/ExpoLocation.podspec +9 -0
- package/ios/LocationUtils.swift +3 -1
- package/ios/next/LocationModuleNext.swift +110 -0
- package/ios/next/LocationNextExceptions.swift +118 -0
- package/ios/next/LocationUpdatesHandle/LocationUpdatesHandle.swift +52 -0
- package/ios/next/LocationUpdatesHandle/LocationUpdatesTaskConsumer.swift +40 -0
- package/ios/next/LocationUpdatesHandle/LocationUpdatesTaskOptions.swift +19 -0
- package/ios/next/LocationUpdatesHandle/SignificantLocationChangeMonitor.swift +20 -0
- package/ios/next/Permissions/BackgroundPermissionsRequester.swift +34 -0
- package/ios/next/Permissions/CLLocationManager+MainThread.swift +10 -0
- package/ios/next/Permissions/ForegroundPermissionsRequester.swift +38 -0
- package/ios/next/Permissions/LocationAccessGuard.swift +21 -0
- package/ios/next/Permissions/LocationAccuracyAuthorization.swift +9 -0
- package/ios/next/Permissions/LocationAccuracyOption.swift +6 -0
- package/ios/next/Permissions/LocationAuthorizationScope.swift +16 -0
- package/ios/next/Permissions/LocationManagerAlwaysAuthorizationRequest.swift +109 -0
- package/ios/next/Permissions/LocationPermissionKind.swift +26 -0
- package/ios/next/Permissions/LocationPermissionResponse.swift +51 -0
- package/ios/next/Permissions/LocationPermissionsDelegate.swift +85 -0
- package/ios/next/Permissions/LocationPermissionsRequester.swift +96 -0
- package/ios/next/Permissions/LocationPlistKeys.swift +10 -0
- package/ios/next/Permissions/PermissionsRequestOptions.swift +5 -0
- package/ios/next/Permissions/TemporaryFullAccuracyPlistKeys.swift +13 -0
- package/ios/next/Permissions/TemporaryFullAccuracyRequester.swift +28 -0
- package/ios/next/Position/Coordinates.swift +7 -0
- package/ios/next/Position/GetPositionOptions.swift +7 -0
- package/ios/next/Position/LocationUpdateDiagnostics.swift +41 -0
- package/ios/next/Position/Position.swift +43 -0
- package/ios/next/Position/PositionRequester.swift +55 -0
- package/ios/next/Position/PositionUpdatesCompatibilitySource.swift +43 -0
- package/ios/next/Position/PositionUpdatesLiveSource.swift +46 -0
- package/ios/next/Position/PositionUpdatesSource.swift +40 -0
- package/ios/next/Position/PositionUpdatesSubscription.swift +85 -0
- package/ios/next/PositionWatcher/PositionWatchStatus.swift +9 -0
- package/ios/next/PositionWatcher/PositionWatcher.swift +143 -0
- package/ios/next/Profile.swift +60 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.module → 58.0.13/expo.modules.location-58.0.13.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.pom → 58.0.13/expo.modules.location-58.0.13.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.sha512 +1 -0
- package/package.json +32 -3
- package/plugin/build/withLocation.d.ts +18 -0
- package/plugin/build/withLocation.js +28 -1
- package/plugin/build/withLocation.js.map +1 -1
- package/plugin/src/withLocation.ts +52 -0
- package/src/Location.types.ts +4 -1
- package/src/next/Location.ts +12 -0
- package/src/next/index.ts +28 -0
- package/src/next/js/LocationProvider.ts +28 -0
- package/src/next/js/LocationUpdatesHandle.ts +60 -0
- package/src/next/js/Permissions.ts +34 -0
- package/src/next/js/PositionWatchHandle.ts +75 -0
- package/src/next/js/getPosition.ts +6 -0
- package/src/next/js/index.ts +21 -0
- package/src/next/js/locationServices.ts +38 -0
- package/src/next/native/NativeLocationModuleNext.ts +9 -0
- package/src/next/native/index.ts +10 -0
- package/src/next/native/types/NativeLocationModuleNextClass.types.ts +34 -0
- package/src/next/native/types/NativeLocationProviderClass.types.ts +12 -0
- package/src/next/native/types/NativeLocationUpdatesHandleClass.types.ts +9 -0
- package/src/next/native/types/NativePositionWatchHandleClass.types.ts +14 -0
- package/src/next/types/LocationProvider.types.ts +1 -0
- package/src/next/types/Permissions.types.ts +27 -0
- package/src/next/types/Position.types.ts +58 -0
- package/src/next/types/index.ts +3 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar → 58.0.13/expo.modules.location-58.0.13-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.md5 → 58.0.13/expo.modules.location-58.0.13-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.sha1 → 58.0.13/expo.modules.location-58.0.13-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.sha256 → 58.0.13/expo.modules.location-58.0.13-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.sha512 → 58.0.13/expo.modules.location-58.0.13-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar → 58.0.13/expo.modules.location-58.0.13.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.md5 → 58.0.13/expo.modules.location-58.0.13.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.sha1 → 58.0.13/expo.modules.location-58.0.13.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.sha256 → 58.0.13/expo.modules.location-58.0.13.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.sha512 → 58.0.13/expo.modules.location-58.0.13.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [iOS] Report `mocked` on `LocationObject` using `CLLocationSourceInformation.isSimulatedBySoftware`. ([#50683](https://github.com/expo/expo/pull/50683) by [@JagjeevanAK](https://github.com/JagjeevanAK))
|
|
8
|
+
- [iOS] Add `getPosition` to `expo-location/next`. ([#50198](https://github.com/expo/expo/pull/50198) by [@Wenszel](https://github.com/Wenszel))
|
|
9
|
+
- [iOS] Add `LocationUpdatesHandle` to `expo-location/next`. ([#50263](https://github.com/expo/expo/pull/50263) by [@Wenszel](https://github.com/Wenszel))
|
|
10
|
+
- [iOS] Add permissions to `expo-location/next`. ([#49972](https://github.com/expo/expo/pull/49972) by [@Wenszel](https://github.com/Wenszel))
|
|
11
|
+
- [iOS] Add `PositionWatchHandle` to `expo-location/next`. ([#50262](https://github.com/expo/expo/pull/50262) by [@Wenszel](https://github.com/Wenszel))
|
|
12
|
+
- Add the TypeScript API layer for `expo-location/next`. ([#49849](https://github.com/expo/expo/pull/49849) by [@Wenszel](https://github.com/Wenszel))
|
|
13
|
+
|
|
3
14
|
## 58.0.12
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '58.0.
|
|
7
|
+
version = '58.0.13'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.location"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 29
|
|
13
|
-
versionName "58.0.
|
|
13
|
+
versionName "58.0.13"
|
|
14
14
|
consumerProguardFiles("proguard-rules.pro")
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -244,8 +244,11 @@ export type LocationObject = {
|
|
|
244
244
|
*/
|
|
245
245
|
timestamp: number;
|
|
246
246
|
/**
|
|
247
|
-
* Whether the location coordinates is mocked or not.
|
|
247
|
+
* Whether the location coordinates is mocked or not. On Android, this is `true` when the location
|
|
248
|
+
* comes from a mock provider. On iOS, it is `true` when the location is simulated by software
|
|
249
|
+
* (for example, by Xcode or a location-spoofing tool).
|
|
248
250
|
* @platform android
|
|
251
|
+
* @platform ios
|
|
249
252
|
*/
|
|
250
253
|
mocked?: boolean;
|
|
251
254
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Location.types.ts"],"sourcesContent":[null],"names":["LocationAccuracy","LocationActivityType","LocationGeofencingEventType","LocationGeofencingRegionState","MotionActivityConfidence","MotionActivityType"],"mappings":"AAEA,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKA,0CAAAA;IACV;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;WAvBSA;MAyBX;AAED,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKC,8CAAAA;IACV;;GAEC;IAED;;;GAGC;IAED;;;GAGC;IAED;;;GAGC;IAED;;;;GAIC;WAxBSA;MA0BX;AAED,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKC,qDAAAA;IACV;;GAEC;IAED;;GAEC;WAPSA;MASX;AAED,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKC,uDAAAA;IACV;;GAEC;IAED;;GAEC;IAED;;GAEC;WAXSA;MAaX;
|
|
1
|
+
{"version":3,"sources":["Location.types.ts"],"sourcesContent":[null],"names":["LocationAccuracy","LocationActivityType","LocationGeofencingEventType","LocationGeofencingRegionState","MotionActivityConfidence","MotionActivityType"],"mappings":"AAEA,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKA,0CAAAA;IACV;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;WAvBSA;MAyBX;AAED,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKC,8CAAAA;IACV;;GAEC;IAED;;;GAGC;IAED;;;GAGC;IAED;;;GAGC;IAED;;;;GAIC;WAxBSA;MA0BX;AAED,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKC,qDAAAA;IACV;;GAEC;IAED;;GAEC;WAPSA;MASX;AAED,cAAc;AACd;;CAEC,GACD,OAAO,IAAA,AAAKC,uDAAAA;IACV;;GAEC;IAED;;GAEC;IAED;;GAEC;WAXSA;MAaX;AAqaD;;;CAGC,GACD,OAAO,IAAA,AAAKC,kDAAAA;IACV;;GAEC;IAED;;GAEC;IAED;;GAEC;WAXSA;MAaX;AAED;;;;;;CAMC,GACD,OAAO,IAAA,AAAKC,4CAAAA;IACV;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;IAED;;GAEC;WAvBSA;MAyBX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPosition, watchPosition, hasLocationServicesEnabled, enableLocationServices, getForegroundPermissions, requestForegroundPermissions, getBackgroundPermissions, requestBackgroundPermissions, setLocationProvider, getSelectedLocationProviderName, } from './js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { getPosition, watchPosition, hasLocationServicesEnabled, enableLocationServices, getForegroundPermissions, requestForegroundPermissions, getBackgroundPermissions, requestBackgroundPermissions, setLocationProvider, getSelectedLocationProviderName } from './js';
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=Location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/Location.ts"],"sourcesContent":[null],"names":["getPosition","watchPosition","hasLocationServicesEnabled","enableLocationServices","getForegroundPermissions","requestForegroundPermissions","getBackgroundPermissions","requestBackgroundPermissions","setLocationProvider","getSelectedLocationProviderName"],"mappings":"AAAA,SACEA,WAAW,EACXC,aAAa,EACbC,0BAA0B,EAC1BC,sBAAsB,EACtBC,wBAAwB,EACxBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,4BAA4B,EAC5BC,mBAAmB,EACnBC,+BAA+B,QAC1B,OAAO"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * as Location from './Location';
|
|
2
|
+
export { useForegroundLocationPermissions, useBackgroundLocationPermissions, useLocationServices, PositionWatchHandle, LocationProvider, LocationUpdatesHandle, defineLocationTask, } from './js';
|
|
3
|
+
export { LocationProfile, LocationAccuracy, LocationScope, RequestPermissionsAccuracyOption, type Coordinates, type Position, type PositionUpdate, type PositionWatchError, type PositionWatchStatus, type WatchPositionParams, type GetPositionOptions, type LocationPermissionResponse, type RequestPermissionsOptions, type LocationProviderRefType, } from './types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * as Location from './Location';
|
|
2
|
+
export { useForegroundLocationPermissions, useBackgroundLocationPermissions, useLocationServices, PositionWatchHandle, LocationProvider, LocationUpdatesHandle, defineLocationTask } from './js';
|
|
3
|
+
export { LocationProfile, LocationAccuracy, LocationScope, RequestPermissionsAccuracyOption } from './types';
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/index.ts"],"sourcesContent":[null],"names":["Location","useForegroundLocationPermissions","useBackgroundLocationPermissions","useLocationServices","PositionWatchHandle","LocationProvider","LocationUpdatesHandle","defineLocationTask","LocationProfile","LocationAccuracy","LocationScope","RequestPermissionsAccuracyOption"],"mappings":"AAAA,OAAO,KAAKA,QAAQ,MAAM,aAAa;AAEvC,SACEC,gCAAgC,EAChCC,gCAAgC,EAChCC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,EAChBC,qBAAqB,EACrBC,kBAAkB,QACb,OAAO;AAEd,SACEC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,gCAAgC,QAW3B,UAAU"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SharedRef } from 'expo';
|
|
2
|
+
import type { LocationProviderRefType } from '../types';
|
|
3
|
+
export declare class LocationProvider {
|
|
4
|
+
static Gms(): SharedRef<LocationProviderRefType>;
|
|
5
|
+
static Android(): SharedRef<LocationProviderRefType>;
|
|
6
|
+
static Fallback(providers: SharedRef<LocationProviderRefType>[]): SharedRef<LocationProviderRefType>;
|
|
7
|
+
}
|
|
8
|
+
export declare function setLocationProvider(provider: SharedRef<LocationProviderRefType>): void;
|
|
9
|
+
export declare function getSelectedLocationProviderName(): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NativeLocationModuleNext, NativeLocationProvider } from '../native';
|
|
2
|
+
export class LocationProvider {
|
|
3
|
+
static Gms() {
|
|
4
|
+
return NativeLocationProvider.Gms();
|
|
5
|
+
}
|
|
6
|
+
static Android() {
|
|
7
|
+
return NativeLocationProvider.Android();
|
|
8
|
+
}
|
|
9
|
+
static Fallback(providers) {
|
|
10
|
+
return NativeLocationProvider.Fallback(providers);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export function setLocationProvider(provider) {
|
|
14
|
+
NativeLocationModuleNext.setLocationProvider(provider);
|
|
15
|
+
}
|
|
16
|
+
export function getSelectedLocationProviderName() {
|
|
17
|
+
return NativeLocationModuleNext.getSelectedLocationProviderName();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=LocationProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/LocationProvider.ts"],"sourcesContent":[null],"names":["NativeLocationModuleNext","NativeLocationProvider","LocationProvider","Gms","Android","Fallback","providers","setLocationProvider","provider","getSelectedLocationProviderName"],"mappings":"AAEA,SAASA,wBAAwB,EAAEC,sBAAsB,QAAQ,YAAY;AAG7E,OAAO,MAAMC;IACX,OAAOC,MAA0C;QAC/C,OAAOF,uBAAuBE,GAAG;IACnC;IAEA,OAAOC,UAA8C;QACnD,OAAOH,uBAAuBG,OAAO;IACvC;IAEA,OAAOC,SACLC,SAA+C,EACX;QACpC,OAAOL,uBAAuBI,QAAQ,CAACC;IACzC;AACF;AAEA,OAAO,SAASC,oBAAoBC,QAA4C;IAC9ER,yBAAyBO,mBAAmB,CAACC;AAC/C;AAEA,OAAO,SAASC;IACd,OAAOT,yBAAyBS,+BAA+B;AACjE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TaskManagerError } from 'expo-task-manager';
|
|
2
|
+
import type { LocationProfile, Position } from '../types';
|
|
3
|
+
export declare class LocationUpdatesHandle {
|
|
4
|
+
private readonly nativeHandle;
|
|
5
|
+
constructor(taskName?: string);
|
|
6
|
+
withProfile(profile: LocationProfile): this;
|
|
7
|
+
start(): Promise<void>;
|
|
8
|
+
stop(): Promise<void>;
|
|
9
|
+
hasStarted(): Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineLocationTask({ taskName, onPosition, onError, }: {
|
|
12
|
+
taskName?: string;
|
|
13
|
+
onPosition: (position: Position) => void;
|
|
14
|
+
onError?: (error: TaskManagerError) => void;
|
|
15
|
+
}): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NativeLocationUpdatesHandle } from '../native';
|
|
2
|
+
const DEFAULT_LOCATION_TASK_NAME = 'expo-location-background-location';
|
|
3
|
+
export class LocationUpdatesHandle {
|
|
4
|
+
nativeHandle;
|
|
5
|
+
constructor(taskName = DEFAULT_LOCATION_TASK_NAME){
|
|
6
|
+
this.nativeHandle = new NativeLocationUpdatesHandle(taskName);
|
|
7
|
+
}
|
|
8
|
+
withProfile(profile) {
|
|
9
|
+
this.nativeHandle.withProfile(profile);
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
start() {
|
|
13
|
+
return this.nativeHandle.start();
|
|
14
|
+
}
|
|
15
|
+
stop() {
|
|
16
|
+
return this.nativeHandle.stop();
|
|
17
|
+
}
|
|
18
|
+
hasStarted() {
|
|
19
|
+
return this.nativeHandle.hasStarted();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function defineLocationTask({ taskName = DEFAULT_LOCATION_TASK_NAME, onPosition, onError }) {
|
|
23
|
+
requireTaskManager().defineTask(taskName, async ({ data, error })=>{
|
|
24
|
+
if (error) {
|
|
25
|
+
onError?.(error);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
onPosition(data);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function requireTaskManager() {
|
|
32
|
+
try {
|
|
33
|
+
return require('expo-task-manager');
|
|
34
|
+
} catch {
|
|
35
|
+
throw new Error("defineLocationTask couldn't define the background location task because the 'expo-task-manager' package isn't installed. Background location updates are delivered through it. Install it with `npx expo install expo-task-manager` and rebuild the app.");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=LocationUpdatesHandle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/LocationUpdatesHandle.ts"],"sourcesContent":[null],"names":["NativeLocationUpdatesHandle","DEFAULT_LOCATION_TASK_NAME","LocationUpdatesHandle","nativeHandle","taskName","withProfile","profile","start","stop","hasStarted","defineLocationTask","onPosition","onError","requireTaskManager","defineTask","data","error","require","Error"],"mappings":"AAEA,SAASA,2BAA2B,QAAQ,YAAY;AAIxD,MAAMC,6BAA6B;AAEnC,OAAO,MAAMC;IACMC,aAA+C;IAEhE,YAAYC,WAAmBH,0BAA0B,CAAE;QACzD,IAAI,CAACE,YAAY,GAAG,IAAIH,4BAA4BI;IACtD;IAEAC,YAAYC,OAAwB,EAAQ;QAC1C,IAAI,CAACH,YAAY,CAACE,WAAW,CAACC;QAC9B,OAAO,IAAI;IACb;IAEAC,QAAuB;QACrB,OAAO,IAAI,CAACJ,YAAY,CAACI,KAAK;IAChC;IAEAC,OAAsB;QACpB,OAAO,IAAI,CAACL,YAAY,CAACK,IAAI;IAC/B;IAEAC,aAA+B;QAC7B,OAAO,IAAI,CAACN,YAAY,CAACM,UAAU;IACrC;AACF;AAEA,OAAO,SAASC,mBAAmB,EACjCN,WAAWH,0BAA0B,EACrCU,UAAU,EACVC,OAAO,EAKR;IACCC,qBAAqBC,UAAU,CAAWV,UAAU,OAAO,EAAEW,IAAI,EAAEC,KAAK,EAAE;QACxE,IAAIA,OAAO;YACTJ,UAAUI;YACV;QACF;QACAL,WAAWI;IACb;AACF;AAEA,SAASF;IACP,IAAI;QACF,OAAOI,QAAQ;IACjB,EAAE,OAAM;QACN,MAAM,IAAIC,MACR;IAEJ;AACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LocationPermissionResponse, RequestPermissionsOptions } from '../types';
|
|
2
|
+
export declare function getForegroundPermissions(): Promise<LocationPermissionResponse>;
|
|
3
|
+
export declare function requestForegroundPermissions(options?: RequestPermissionsOptions): Promise<LocationPermissionResponse>;
|
|
4
|
+
export declare function getBackgroundPermissions(): Promise<LocationPermissionResponse>;
|
|
5
|
+
export declare function requestBackgroundPermissions(options?: RequestPermissionsOptions): Promise<LocationPermissionResponse>;
|
|
6
|
+
export declare const useForegroundLocationPermissions: (options?: import("expo-modules-core").PermissionHookOptions<RequestPermissionsOptions> | undefined) => [LocationPermissionResponse | null, () => Promise<LocationPermissionResponse>, () => Promise<LocationPermissionResponse>];
|
|
7
|
+
export declare const useBackgroundLocationPermissions: (options?: import("expo-modules-core").PermissionHookOptions<RequestPermissionsOptions> | undefined) => [LocationPermissionResponse | null, () => Promise<LocationPermissionResponse>, () => Promise<LocationPermissionResponse>];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createPermissionHook } from 'expo-modules-core';
|
|
2
|
+
import { NativeLocationModuleNext } from '../native';
|
|
3
|
+
export async function getForegroundPermissions() {
|
|
4
|
+
return NativeLocationModuleNext.getForegroundPermissions();
|
|
5
|
+
}
|
|
6
|
+
export async function requestForegroundPermissions(options) {
|
|
7
|
+
return NativeLocationModuleNext.requestForegroundPermissions(options);
|
|
8
|
+
}
|
|
9
|
+
export async function getBackgroundPermissions() {
|
|
10
|
+
return NativeLocationModuleNext.getBackgroundPermissions();
|
|
11
|
+
}
|
|
12
|
+
export async function requestBackgroundPermissions(options) {
|
|
13
|
+
return NativeLocationModuleNext.requestBackgroundPermissions(options);
|
|
14
|
+
}
|
|
15
|
+
export const useForegroundLocationPermissions = createPermissionHook({
|
|
16
|
+
getMethod: getForegroundPermissions,
|
|
17
|
+
requestMethod: requestForegroundPermissions
|
|
18
|
+
});
|
|
19
|
+
export const useBackgroundLocationPermissions = createPermissionHook({
|
|
20
|
+
getMethod: getBackgroundPermissions,
|
|
21
|
+
requestMethod: requestBackgroundPermissions
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=Permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/Permissions.ts"],"sourcesContent":[null],"names":["createPermissionHook","NativeLocationModuleNext","getForegroundPermissions","requestForegroundPermissions","options","getBackgroundPermissions","requestBackgroundPermissions","useForegroundLocationPermissions","getMethod","requestMethod","useBackgroundLocationPermissions"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,oBAAoB;AAEzD,SAASC,wBAAwB,QAAQ,YAAY;AAGrD,OAAO,eAAeC;IACpB,OAAOD,yBAAyBC,wBAAwB;AAC1D;AAEA,OAAO,eAAeC,6BACpBC,OAAmC;IAEnC,OAAOH,yBAAyBE,4BAA4B,CAACC;AAC/D;AAEA,OAAO,eAAeC;IACpB,OAAOJ,yBAAyBI,wBAAwB;AAC1D;AAEA,OAAO,eAAeC,6BACpBF,OAAmC;IAEnC,OAAOH,yBAAyBK,4BAA4B,CAACF;AAC/D;AAEA,OAAO,MAAMG,mCAAmCP,qBAAqB;IACnEQ,WAAWN;IACXO,eAAeN;AACjB,GAAG;AAEH,OAAO,MAAMO,mCAAmCV,qBAAqB;IACnEQ,WAAWH;IACXI,eAAeH;AACjB,GAAG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EventSubscription } from 'expo';
|
|
2
|
+
import { LocationProfile } from '../types';
|
|
3
|
+
import type { Position, PositionWatchError, PositionWatchStatus, WatchPositionParams } from '../types';
|
|
4
|
+
export declare class PositionWatchHandle {
|
|
5
|
+
private readonly nativeHandle;
|
|
6
|
+
constructor(profile?: LocationProfile);
|
|
7
|
+
pause(): void;
|
|
8
|
+
resume(): boolean;
|
|
9
|
+
withProfile(profile: LocationProfile): this;
|
|
10
|
+
withInterval(intervalSeconds: number): this;
|
|
11
|
+
restart(): boolean;
|
|
12
|
+
status(): PositionWatchStatus;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
addListener(onPosition: (position: Position) => void, onError?: (error: PositionWatchError) => void): EventSubscription;
|
|
15
|
+
}
|
|
16
|
+
export declare function watchPosition({ profile, onPosition, onError, }: WatchPositionParams): PositionWatchHandle;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { NativeLocationModuleNext } from '../native';
|
|
2
|
+
import { LocationProfile } from '../types';
|
|
3
|
+
export class PositionWatchHandle {
|
|
4
|
+
nativeHandle;
|
|
5
|
+
constructor(profile = LocationProfile.DEFAULT){
|
|
6
|
+
this.nativeHandle = NativeLocationModuleNext.watchPosition(profile);
|
|
7
|
+
}
|
|
8
|
+
pause() {
|
|
9
|
+
this.nativeHandle.pause();
|
|
10
|
+
}
|
|
11
|
+
resume() {
|
|
12
|
+
return this.nativeHandle.resume();
|
|
13
|
+
}
|
|
14
|
+
withProfile(profile) {
|
|
15
|
+
this.nativeHandle.withProfile(profile);
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
withInterval(intervalSeconds) {
|
|
19
|
+
this.nativeHandle.withInterval(intervalSeconds);
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
restart() {
|
|
23
|
+
return this.nativeHandle.restart();
|
|
24
|
+
}
|
|
25
|
+
status() {
|
|
26
|
+
return this.nativeHandle.status();
|
|
27
|
+
}
|
|
28
|
+
dispose() {
|
|
29
|
+
this.nativeHandle.removeAllListeners('positionChanged');
|
|
30
|
+
this.nativeHandle.release();
|
|
31
|
+
}
|
|
32
|
+
addListener(onPosition, onError) {
|
|
33
|
+
return this.nativeHandle.addListener('positionChanged', ({ data, error })=>{
|
|
34
|
+
if (error != null) {
|
|
35
|
+
onError?.(error);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (data != null) {
|
|
39
|
+
onPosition(data);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export function watchPosition({ profile = LocationProfile.DEFAULT, onPosition, onError }) {
|
|
45
|
+
const handle = new PositionWatchHandle(profile);
|
|
46
|
+
handle.addListener(onPosition, onError);
|
|
47
|
+
return handle;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=PositionWatchHandle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/PositionWatchHandle.ts"],"sourcesContent":[null],"names":["NativeLocationModuleNext","LocationProfile","PositionWatchHandle","nativeHandle","profile","DEFAULT","watchPosition","pause","resume","withProfile","withInterval","intervalSeconds","restart","status","dispose","removeAllListeners","release","addListener","onPosition","onError","data","error","handle"],"mappings":"AAEA,SAASA,wBAAwB,QAAQ,YAAY;AAErD,SAASC,eAAe,QAAQ,WAAW;AAQ3C,OAAO,MAAMC;IACMC,aAA6C;IAE9D,YAAYC,UAA2BH,gBAAgBI,OAAO,CAAE;QAC9D,IAAI,CAACF,YAAY,GAAGH,yBAAyBM,aAAa,CAACF;IAC7D;IAEAG,QAAc;QACZ,IAAI,CAACJ,YAAY,CAACI,KAAK;IACzB;IAEAC,SAAkB;QAChB,OAAO,IAAI,CAACL,YAAY,CAACK,MAAM;IACjC;IAEAC,YAAYL,OAAwB,EAAQ;QAC1C,IAAI,CAACD,YAAY,CAACM,WAAW,CAACL;QAC9B,OAAO,IAAI;IACb;IAEAM,aAAaC,eAAuB,EAAQ;QAC1C,IAAI,CAACR,YAAY,CAACO,YAAY,CAACC;QAC/B,OAAO,IAAI;IACb;IAEAC,UAAmB;QACjB,OAAO,IAAI,CAACT,YAAY,CAACS,OAAO;IAClC;IAEAC,SAA8B;QAC5B,OAAO,IAAI,CAACV,YAAY,CAACU,MAAM;IACjC;IAEAC,UAAgB;QACd,IAAI,CAACX,YAAY,CAACY,kBAAkB,CAAC;QACrC,IAAI,CAACZ,YAAY,CAACa,OAAO;IAC3B;IAEAC,YACEC,UAAwC,EACxCC,OAA6C,EAC1B;QACnB,OAAO,IAAI,CAAChB,YAAY,CAACc,WAAW,CAAC,mBAAmB,CAAC,EAAEG,IAAI,EAAEC,KAAK,EAAE;YACtE,IAAIA,SAAS,MAAM;gBACjBF,UAAUE;gBACV;YACF;YACA,IAAID,QAAQ,MAAM;gBAChBF,WAAWE;YACb;QACF;IACF;AACF;AAEA,OAAO,SAASd,cAAc,EAC5BF,UAAUH,gBAAgBI,OAAO,EACjCa,UAAU,EACVC,OAAO,EACa;IACpB,MAAMG,SAAS,IAAIpB,oBAAoBE;IACvCkB,OAAOL,WAAW,CAACC,YAAYC;IAC/B,OAAOG;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/getPosition.ts"],"sourcesContent":[null],"names":["NativeLocationModuleNext","getPosition","options"],"mappings":"AAAA,SAASA,wBAAwB,QAAQ,YAAY;AAGrD,OAAO,eAAeC,YAAYC,OAA4B;IAC5D,OAAOF,yBAAyBC,WAAW,CAACC;AAC9C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { getPosition } from './getPosition';
|
|
2
|
+
export { hasLocationServicesEnabled, enableLocationServices, useLocationServices, } from './locationServices';
|
|
3
|
+
export { PositionWatchHandle, watchPosition } from './PositionWatchHandle';
|
|
4
|
+
export { LocationProvider, setLocationProvider, getSelectedLocationProviderName, } from './LocationProvider';
|
|
5
|
+
export { getForegroundPermissions, requestForegroundPermissions, getBackgroundPermissions, requestBackgroundPermissions, useForegroundLocationPermissions, useBackgroundLocationPermissions, } from './Permissions';
|
|
6
|
+
export { LocationUpdatesHandle, defineLocationTask } from './LocationUpdatesHandle';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { getPosition } from './getPosition';
|
|
2
|
+
export { hasLocationServicesEnabled, enableLocationServices, useLocationServices } from './locationServices';
|
|
3
|
+
export { PositionWatchHandle, watchPosition } from './PositionWatchHandle';
|
|
4
|
+
export { LocationProvider, setLocationProvider, getSelectedLocationProviderName } from './LocationProvider';
|
|
5
|
+
export { getForegroundPermissions, requestForegroundPermissions, getBackgroundPermissions, requestBackgroundPermissions, useForegroundLocationPermissions, useBackgroundLocationPermissions } from './Permissions';
|
|
6
|
+
export { LocationUpdatesHandle, defineLocationTask } from './LocationUpdatesHandle';
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/index.ts"],"sourcesContent":[null],"names":["getPosition","hasLocationServicesEnabled","enableLocationServices","useLocationServices","PositionWatchHandle","watchPosition","LocationProvider","setLocationProvider","getSelectedLocationProviderName","getForegroundPermissions","requestForegroundPermissions","getBackgroundPermissions","requestBackgroundPermissions","useForegroundLocationPermissions","useBackgroundLocationPermissions","LocationUpdatesHandle","defineLocationTask"],"mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAC5C,SACEC,0BAA0B,EAC1BC,sBAAsB,EACtBC,mBAAmB,QACd,qBAAqB;AAC5B,SAASC,mBAAmB,EAAEC,aAAa,QAAQ,wBAAwB;AAC3E,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,+BAA+B,QAC1B,qBAAqB;AAC5B,SACEC,wBAAwB,EACxBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,4BAA4B,EAC5BC,gCAAgC,EAChCC,gCAAgC,QAC3B,gBAAgB;AACvB,SAASC,qBAAqB,EAAEC,kBAAkB,QAAQ,0BAA0B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Platform, UnavailabilityError } from 'expo';
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import { AppState } from 'react-native';
|
|
4
|
+
import { NativeLocationModuleNext } from '../native';
|
|
5
|
+
export function hasLocationServicesEnabled() {
|
|
6
|
+
return NativeLocationModuleNext.hasLocationServicesEnabled();
|
|
7
|
+
}
|
|
8
|
+
export async function enableLocationServices() {
|
|
9
|
+
if (Platform.OS !== 'android') {
|
|
10
|
+
throw new UnavailabilityError('expo-location', 'enableLocationServices');
|
|
11
|
+
}
|
|
12
|
+
return NativeLocationModuleNext.enableLocationServices();
|
|
13
|
+
}
|
|
14
|
+
export function useLocationServices() {
|
|
15
|
+
const [enabled, setEnabled] = useState(hasLocationServicesEnabled);
|
|
16
|
+
useEffect(()=>{
|
|
17
|
+
const subscription = AppState.addEventListener('change', (state)=>{
|
|
18
|
+
if (state === 'active') {
|
|
19
|
+
setEnabled(hasLocationServicesEnabled());
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return ()=>subscription.remove();
|
|
23
|
+
}, []);
|
|
24
|
+
const enable = useCallback(async ()=>{
|
|
25
|
+
const result = await enableLocationServices();
|
|
26
|
+
setEnabled(result);
|
|
27
|
+
return result;
|
|
28
|
+
}, []);
|
|
29
|
+
return [
|
|
30
|
+
enabled,
|
|
31
|
+
enable
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=locationServices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/js/locationServices.ts"],"sourcesContent":[null],"names":["Platform","UnavailabilityError","useCallback","useEffect","useState","AppState","NativeLocationModuleNext","hasLocationServicesEnabled","enableLocationServices","OS","useLocationServices","enabled","setEnabled","subscription","addEventListener","state","remove","enable","result"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,mBAAmB,QAAQ,OAAO;AACrD,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AACzD,SAASC,QAAQ,QAAQ,eAAe;AAExC,SAASC,wBAAwB,QAAQ,YAAY;AAErD,OAAO,SAASC;IACd,OAAOD,yBAAyBC,0BAA0B;AAC5D;AAEA,OAAO,eAAeC;IACpB,IAAIR,SAASS,EAAE,KAAK,WAAW;QAC7B,MAAM,IAAIR,oBAAoB,iBAAiB;IACjD;IAEA,OAAOK,yBAAyBE,sBAAsB;AACxD;AAEA,OAAO,SAASE;IACd,MAAM,CAACC,SAASC,WAAW,GAAGR,SAASG;IAEvCJ,UAAU;QACR,MAAMU,eAAeR,SAASS,gBAAgB,CAAC,UAAU,CAACC;YACxD,IAAIA,UAAU,UAAU;gBACtBH,WAAWL;YACb;QACF;QACA,OAAO,IAAMM,aAAaG,MAAM;IAClC,GAAG,EAAE;IAEL,MAAMC,SAASf,YAAY;QACzB,MAAMgB,SAAS,MAAMV;QACrBI,WAAWM;QACX,OAAOA;IACT,GAAG,EAAE;IAEL,OAAO;QAACP;QAASM;KAAO;AAC1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NativeLocationModuleNextClass } from './types/NativeLocationModuleNextClass.types';
|
|
2
|
+
export declare const NativeLocationModuleNext: NativeLocationModuleNextClass;
|
|
3
|
+
export declare const NativeLocationProvider: typeof import(".").NativeLocationProviderClass;
|
|
4
|
+
export declare const NativePositionWatchHandle: typeof import(".").NativePositionWatchHandleClass;
|
|
5
|
+
export declare const NativeLocationUpdatesHandle: typeof import(".").NativeLocationUpdatesHandleClass;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { requireNativeModule } from 'expo';
|
|
2
|
+
export const NativeLocationModuleNext = requireNativeModule('LocationModuleNext');
|
|
3
|
+
export const NativeLocationProvider = NativeLocationModuleNext.LocationProvider;
|
|
4
|
+
export const NativePositionWatchHandle = NativeLocationModuleNext.PositionWatchHandle;
|
|
5
|
+
export const NativeLocationUpdatesHandle = NativeLocationModuleNext.LocationUpdatesHandle;
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=NativeLocationModuleNext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/native/NativeLocationModuleNext.ts"],"sourcesContent":[null],"names":["requireNativeModule","NativeLocationModuleNext","NativeLocationProvider","LocationProvider","NativePositionWatchHandle","PositionWatchHandle","NativeLocationUpdatesHandle","LocationUpdatesHandle"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,OAAO;AAI3C,OAAO,MAAMC,2BACXD,oBAAmD,sBAAsB;AAC3E,OAAO,MAAME,yBAAyBD,yBAAyBE,gBAAgB,CAAC;AAChF,OAAO,MAAMC,4BAA4BH,yBAAyBI,mBAAmB,CAAC;AACtF,OAAO,MAAMC,8BAA8BL,yBAAyBM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { NativeLocationModuleNext, NativeLocationProvider, NativePositionWatchHandle, NativeLocationUpdatesHandle, } from './NativeLocationModuleNext';
|
|
2
|
+
export type { NativeLocationModuleNextClass } from './types/NativeLocationModuleNextClass.types';
|
|
3
|
+
export type { NativePositionWatchHandleClass } from './types/NativePositionWatchHandleClass.types';
|
|
4
|
+
export type { NativeLocationProviderClass } from './types/NativeLocationProviderClass.types';
|
|
5
|
+
export type { NativeLocationUpdatesHandleClass } from './types/NativeLocationUpdatesHandleClass.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/native/index.ts"],"sourcesContent":[null],"names":["NativeLocationModuleNext","NativeLocationProvider","NativePositionWatchHandle","NativeLocationUpdatesHandle"],"mappings":"AAAA,SACEA,wBAAwB,EACxBC,sBAAsB,EACtBC,yBAAyB,EACzBC,2BAA2B,QACtB,6BAA6B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeModule } from 'expo';
|
|
2
|
+
import type { SharedRef } from 'expo';
|
|
3
|
+
import type { GetPositionOptions, LocationPermissionResponse, LocationProfile, LocationProviderRefType, Position, RequestPermissionsOptions } from '../../types';
|
|
4
|
+
import type { NativeLocationProviderClass } from './NativeLocationProviderClass.types';
|
|
5
|
+
import type { NativeLocationUpdatesHandleClass } from './NativeLocationUpdatesHandleClass.types';
|
|
6
|
+
import type { NativePositionWatchHandleClass } from './NativePositionWatchHandleClass.types';
|
|
7
|
+
export declare class NativeLocationModuleNextClass extends NativeModule {
|
|
8
|
+
requestForegroundPermissions(options?: RequestPermissionsOptions): Promise<LocationPermissionResponse>;
|
|
9
|
+
getForegroundPermissions(): Promise<LocationPermissionResponse>;
|
|
10
|
+
requestBackgroundPermissions(options?: RequestPermissionsOptions): Promise<LocationPermissionResponse>;
|
|
11
|
+
getBackgroundPermissions(): Promise<LocationPermissionResponse>;
|
|
12
|
+
setLocationProvider(provider: SharedRef<LocationProviderRefType>): void;
|
|
13
|
+
getSelectedLocationProviderName(): string;
|
|
14
|
+
hasLocationServicesEnabled(): boolean;
|
|
15
|
+
enableLocationServices(): Promise<boolean>;
|
|
16
|
+
getPosition(options?: GetPositionOptions): Promise<Position | null>;
|
|
17
|
+
watchPosition(profile?: LocationProfile): NativePositionWatchHandleClass;
|
|
18
|
+
LocationProvider: typeof NativeLocationProviderClass;
|
|
19
|
+
PositionWatchHandle: typeof NativePositionWatchHandleClass;
|
|
20
|
+
LocationUpdatesHandle: typeof NativeLocationUpdatesHandleClass;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/native/types/NativeLocationModuleNextClass.types.ts"],"sourcesContent":[null],"names":["NativeModule"],"mappings":"AAAA,SAASA,YAAY,QAAQ,OAAO"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SharedObject } from 'expo';
|
|
2
|
+
import type { SharedRef } from 'expo';
|
|
3
|
+
import type { LocationProviderRefType } from '../../types';
|
|
4
|
+
export declare class NativeLocationProviderClass extends SharedObject {
|
|
5
|
+
static Gms(): SharedRef<LocationProviderRefType>;
|
|
6
|
+
static Android(): SharedRef<LocationProviderRefType>;
|
|
7
|
+
static Fallback(providers: SharedRef<LocationProviderRefType>[]): SharedRef<LocationProviderRefType>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/native/types/NativeLocationProviderClass.types.ts"],"sourcesContent":[null],"names":["SharedObject"],"mappings":"AAAA,SAASA,YAAY,QAAQ,OAAO"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LocationProfile } from '../../types';
|
|
2
|
+
export declare class NativeLocationUpdatesHandleClass {
|
|
3
|
+
constructor(taskName: string);
|
|
4
|
+
withProfile(profile: LocationProfile): void;
|
|
5
|
+
start(): Promise<void>;
|
|
6
|
+
stop(): Promise<void>;
|
|
7
|
+
hasStarted(): Promise<boolean>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/native/types/NativeLocationUpdatesHandleClass.types.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA,WAMC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SharedObject } from 'expo';
|
|
2
|
+
import type { LocationProfile, PositionUpdate, PositionWatchStatus } from '../../types';
|
|
3
|
+
export declare class NativePositionWatchHandleClass extends SharedObject<{
|
|
4
|
+
positionChanged: (update: PositionUpdate) => void;
|
|
5
|
+
}> {
|
|
6
|
+
pause(): void;
|
|
7
|
+
resume(): boolean;
|
|
8
|
+
withProfile(profile: LocationProfile): NativePositionWatchHandleClass;
|
|
9
|
+
withInterval(intervalSeconds: number): NativePositionWatchHandleClass;
|
|
10
|
+
restart(): boolean;
|
|
11
|
+
status(): PositionWatchStatus;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/native/types/NativePositionWatchHandleClass.types.ts"],"sourcesContent":[null],"names":["SharedObject"],"mappings":"AAAA,SAASA,YAAY,QAAQ,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type LocationProviderRefType = 'LocationProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/types/LocationProvider.types.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,WAAyD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PermissionResponse } from 'expo';
|
|
2
|
+
export declare enum LocationScope {
|
|
3
|
+
ALWAYS = "always",
|
|
4
|
+
WHEN_IN_USE = "whenInUse",
|
|
5
|
+
NOT_GRANTED = "notGranted"
|
|
6
|
+
}
|
|
7
|
+
export declare enum LocationAccuracy {
|
|
8
|
+
FULL = "full",
|
|
9
|
+
REDUCED = "reduced",
|
|
10
|
+
NOT_GRANTED = "notGranted"
|
|
11
|
+
}
|
|
12
|
+
export declare enum RequestPermissionsAccuracyOption {
|
|
13
|
+
FULL = "full",
|
|
14
|
+
REDUCED = "reduced"
|
|
15
|
+
}
|
|
16
|
+
export type LocationPermissionResponse = PermissionResponse & {
|
|
17
|
+
scope: LocationScope;
|
|
18
|
+
accuracy: LocationAccuracy;
|
|
19
|
+
};
|
|
20
|
+
export type RequestPermissionsOptions = {
|
|
21
|
+
accuracy?: RequestPermissionsAccuracyOption;
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var LocationScope = /*#__PURE__*/ function(LocationScope) {
|
|
2
|
+
LocationScope["ALWAYS"] = "always";
|
|
3
|
+
LocationScope["WHEN_IN_USE"] = "whenInUse";
|
|
4
|
+
LocationScope["NOT_GRANTED"] = "notGranted";
|
|
5
|
+
return LocationScope;
|
|
6
|
+
}({});
|
|
7
|
+
export var LocationAccuracy = /*#__PURE__*/ function(LocationAccuracy) {
|
|
8
|
+
LocationAccuracy["FULL"] = "full";
|
|
9
|
+
LocationAccuracy["REDUCED"] = "reduced";
|
|
10
|
+
LocationAccuracy["NOT_GRANTED"] = "notGranted";
|
|
11
|
+
return LocationAccuracy;
|
|
12
|
+
}({});
|
|
13
|
+
export var RequestPermissionsAccuracyOption = /*#__PURE__*/ function(RequestPermissionsAccuracyOption) {
|
|
14
|
+
RequestPermissionsAccuracyOption["FULL"] = "full";
|
|
15
|
+
RequestPermissionsAccuracyOption["REDUCED"] = "reduced";
|
|
16
|
+
return RequestPermissionsAccuracyOption;
|
|
17
|
+
}({});
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Permissions.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["next/types/Permissions.types.ts"],"sourcesContent":[null],"names":["LocationScope","LocationAccuracy","RequestPermissionsAccuracyOption"],"mappings":"AAEA,OAAO,IAAA,AAAKA,uCAAAA;;;;WAAAA;MAIX;AAED,OAAO,IAAA,AAAKC,0CAAAA;;;;WAAAA;MAIX;AAED,OAAO,IAAA,AAAKC,0DAAAA;;;WAAAA;MAGX"}
|