expo-location 56.0.6 → 56.0.7
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 +6 -0
- package/android/build.gradle +2 -2
- package/build/ExpoLocation.web.d.ts +1 -1
- package/build/ExpoLocation.web.d.ts.map +1 -1
- package/build/ExpoLocation.web.js +2 -1
- package/build/ExpoLocation.web.js.map +1 -1
- package/build/Location.d.ts +1 -1
- package/build/Location.d.ts.map +1 -1
- package/build/Location.js +2 -2
- package/build/Location.js.map +1 -1
- package/build/Location.types.d.ts +1 -1
- package/build/Location.types.d.ts.map +1 -1
- package/build/Location.types.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.module → 56.0.7/expo.modules.location-56.0.7.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.pom → 56.0.7/expo.modules.location-56.0.7.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.7/expo.modules.location-56.0.7.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/prebuilds/output/debug/xcframeworks/ExpoLocation.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoLocation.tar.gz +0 -0
- package/src/ExpoLocation.web.ts +2 -2
- package/src/Location.ts +2 -3
- package/src/Location.types.ts +1 -1
- package/src/index.ts +1 -5
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/56.0.6/expo.modules.location-56.0.6.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6-sources.jar → 56.0.7/expo.modules.location-56.0.7-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6-sources.jar.md5 → 56.0.7/expo.modules.location-56.0.7-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6-sources.jar.sha1 → 56.0.7/expo.modules.location-56.0.7-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6-sources.jar.sha256 → 56.0.7/expo.modules.location-56.0.7-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6-sources.jar.sha512 → 56.0.7/expo.modules.location-56.0.7-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.aar → 56.0.7/expo.modules.location-56.0.7.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.aar.md5 → 56.0.7/expo.modules.location-56.0.7.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.aar.sha1 → 56.0.7/expo.modules.location-56.0.7.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.aar.sha256 → 56.0.7/expo.modules.location-56.0.7.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{56.0.6/expo.modules.location-56.0.6.aar.sha512 → 56.0.7/expo.modules.location-56.0.7.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.7 — 2026-05-13
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- Updated permission hooks and permission type imports to be imported from `expo` instead of `expo-modules-core` ([#45565](https://github.com/expo/expo/pull/45565) by [@Wenszel](https://github.com/Wenszel))
|
|
18
|
+
|
|
13
19
|
## 56.0.6 — 2026-05-11
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '56.0.
|
|
7
|
+
version = '56.0.7'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.location"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 29
|
|
13
|
-
versionName "56.0.
|
|
13
|
+
versionName "56.0.7"
|
|
14
14
|
consumerProguardFiles("proguard-rules.pro")
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PermissionResponse } from 'expo';
|
|
2
2
|
import type { LocationLastKnownOptions, LocationObject, LocationOptions } from './Location.types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
getProviderStatusAsync(): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoLocation.web.d.ts","sourceRoot":"","sources":["../src/ExpoLocation.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ExpoLocation.web.d.ts","sourceRoot":"","sources":["../src/ExpoLocation.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,MAAM,CAAC;AAGjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;;8BAwHhE,OAAO,CAAC;QAAE,uBAAuB,EAAE,OAAO,CAAA;KAAE,CAAC;wCAMlE,wBAAwB,GAChC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;qCAMM,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC;8BAahD,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;mCAGjB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;+BAG1B,OAAO,CAAC,OAAO,CAAC;oBAG3B,OAAO,CAAC,GAAG,EAAE,CAAC;2BAGP,OAAO,CAAC,GAAG,EAAE,CAAC;oCAGL,MAAM,WAAW,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;yCAiB7C,OAAO,CAAC,kBAAkB,CAAC;yCAG3B,OAAO,CAAC,kBAAkB,CAAC;qCAG/B,OAAO,CAAC,kBAAkB,CAAC;qCAG3B,OAAO,CAAC,kBAAkB,CAAC;;AApEpE,wBAuEE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PermissionStatus
|
|
1
|
+
import { PermissionStatus } from 'expo';
|
|
2
|
+
import { UnavailabilityError } from 'expo-modules-core';
|
|
2
3
|
import { LocationAccuracy } from './Location.types';
|
|
3
4
|
import { LocationEventEmitter } from './LocationEventEmitter';
|
|
4
5
|
class GeocoderError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoLocation.web.js","sourceRoot":"","sources":["../src/ExpoLocation.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,aAAc,SAAQ,KAAK;IAC/B,IAAI,CAAS;IAEb;QACE,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,SAAS,yBAAyB,CAAC,QAAwB;IACzD,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;IACvC,OAAO;QACL,MAAM,EAAE;YACN,QAAQ,EAAE,MA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5B,CAAC;IACD,KAAK,CAAC,mBAAmB;QACvB,MAAM,IAAI,aAAa,EAAE,CAAC;IAC5B,CAAC;IACD,KAAK,CAAC,sBAAsB,CAAC,OAAe,EAAE,OAAwB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,OAAO,GAAG,SAAS,CAAC,WAAW,CAAC,aAAa,CAC3C,CAAC,QAAQ,EAAE,EAAE;gBACX,iBAAiB,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAC;gBACxD,oBAAoB,CAAC,IAAI,CAAC,sBAAsB,EAAE;oBAChD,OAAO;oBACP,QAAQ,EAAE,iBAAiB;iBAC5B,CAAC,CAAC;YACL,CAAC,EACD,SAAS,EACT,OAAO,CACR,CAAC;YACF,OAAO,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iCAAiC;QACrC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,iCAAiC;QACrC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,6BAA6B;QACjC,OAAO,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IACD,KAAK,CAAC,6BAA6B;QACjC,OAAO,mBAAmB,EAAE,CAAC;IAC/B,CAAC;CACF,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo-modules-core';\nimport { PermissionStatus, UnavailabilityError } from 'expo-modules-core';\n\nimport type { LocationLastKnownOptions, LocationObject, LocationOptions } from './Location.types';\nimport { LocationAccuracy } from './Location.types';\nimport { LocationEventEmitter } from './LocationEventEmitter';\n\nclass GeocoderError extends Error {\n code: string;\n\n constructor() {\n super('Geocoder service is not available for this device.');\n this.code = 'E_NO_GEOCODER';\n }\n}\n\n/**\n * Converts `GeolocationPosition` to JavaScript object.\n */\nfunction geolocationPositionToJSON(position: LocationObject): LocationObject {\n const { coords, timestamp } = position;\n return {\n coords: {\n latitude: coords.latitude,\n longitude: coords.longitude,\n altitude: coords.altitude,\n accuracy: coords.accuracy,\n altitudeAccuracy: coords.altitudeAccuracy,\n heading: coords.heading,\n speed: coords.speed,\n },\n timestamp,\n };\n}\n\n/**\n * Checks whether given location didn't exceed given `maxAge` and fits in the required accuracy.\n */\nfunction isLocationValid(location: LocationObject, options: LocationLastKnownOptions): boolean {\n const maxAge = typeof options.maxAge === 'number' ? options.maxAge : Infinity;\n const requiredAccuracy =\n typeof options.requiredAccuracy === 'number' ? options.requiredAccuracy : Infinity;\n const locationAccuracy = location.coords.accuracy ?? Infinity;\n\n return Date.now() - location.timestamp <= maxAge && locationAccuracy <= requiredAccuracy;\n}\n\n/**\n * Gets the permission details. The implementation is not very good as it's not\n * possible to query for permission on all browsers, apparently only the\n * latest versions will support this.\n */\nasync function getPermissionsAsync(shouldAsk = false): Promise<PermissionResponse> {\n if (!navigator?.permissions?.query) {\n throw new UnavailabilityError('expo-location', 'navigator.permissions API is not available');\n }\n\n const permission = await navigator.permissions.query({ name: 'geolocation' });\n\n if (permission.state === 'granted') {\n return {\n status: PermissionStatus.GRANTED,\n granted: true,\n canAskAgain: true,\n expires: 0,\n };\n }\n\n if (permission.state === 'denied') {\n return {\n status: PermissionStatus.DENIED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n };\n }\n\n if (shouldAsk) {\n return new Promise((resolve) => {\n navigator.geolocation.getCurrentPosition(\n () => {\n resolve({\n status: PermissionStatus.GRANTED,\n granted: true,\n canAskAgain: true,\n expires: 0,\n });\n },\n (positionError: GeolocationPositionError) => {\n if (positionError.code === positionError.PERMISSION_DENIED) {\n resolve({\n status: PermissionStatus.DENIED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n });\n return;\n }\n\n resolve({\n status: PermissionStatus.GRANTED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n });\n }\n );\n });\n }\n\n // The permission state is 'prompt' when the permission has not been requested\n // yet, tested on Chrome.\n return {\n status: PermissionStatus.UNDETERMINED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n };\n}\n\nlet lastKnownPosition: LocationObject | null = null;\n\nexport default {\n async getProviderStatusAsync(): Promise<{ locationServicesEnabled: boolean }> {\n return {\n locationServicesEnabled: 'geolocation' in navigator,\n };\n },\n async getLastKnownPositionAsync(\n options: LocationLastKnownOptions = {}\n ): Promise<LocationObject | null> {\n if (lastKnownPosition && isLocationValid(lastKnownPosition, options)) {\n return lastKnownPosition;\n }\n return null;\n },\n async getCurrentPositionAsync(options: LocationOptions): Promise<LocationObject> {\n return new Promise<LocationObject>((resolve, reject) => {\n const resolver: PositionCallback = (position) => {\n lastKnownPosition = geolocationPositionToJSON(position);\n resolve(lastKnownPosition);\n };\n navigator.geolocation.getCurrentPosition(resolver, reject, {\n maximumAge: Infinity,\n enableHighAccuracy: (options.accuracy ?? 0) > LocationAccuracy.Balanced,\n ...options,\n });\n });\n },\n async removeWatchAsync(watchId: number): Promise<void> {\n navigator.geolocation.clearWatch(watchId);\n },\n async watchDeviceHeading(_headingId: number): Promise<void> {\n console.warn('Location.watchDeviceHeading: is not supported on web');\n },\n async hasServicesEnabledAsync(): Promise<boolean> {\n return 'geolocation' in navigator;\n },\n async geocodeAsync(): Promise<any[]> {\n throw new GeocoderError();\n },\n async reverseGeocodeAsync(): Promise<any[]> {\n throw new GeocoderError();\n },\n async watchPositionImplAsync(watchId: number, options: PositionOptions): Promise<number> {\n return new Promise((resolve) => {\n watchId = navigator.geolocation.watchPosition(\n (position) => {\n lastKnownPosition = geolocationPositionToJSON(position);\n LocationEventEmitter.emit('Expo.locationChanged', {\n watchId,\n location: lastKnownPosition,\n });\n },\n undefined,\n options\n );\n resolve(watchId);\n });\n },\n\n async requestForegroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync(true);\n },\n async requestBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync(true);\n },\n async getForegroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync();\n },\n async getBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync();\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ExpoLocation.web.js","sourceRoot":"","sources":["../src/ExpoLocation.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,aAAc,SAAQ,KAAK;IAC/B,IAAI,CAAS;IAEb;QACE,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,SAAS,yBAAyB,CAAC,QAAwB;IACzD,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;IACvC,OAAO;QACL,MAAM,EAAE;YACN,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB;QACD,SAAS;KACV,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,QAAwB,EAAE,OAAiC;IAClF,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC9E,MAAM,gBAAgB,GACpB,OAAO,OAAO,CAAC,gBAAgB,KAAK,QAAQ,CAAC,C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AAC;IAED,KAAK,CAAC,iCAAiC;QACrC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,iCAAiC;QACrC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,6BAA6B;QACjC,OAAO,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IACD,KAAK,CAAC,6BAA6B;QACjC,OAAO,mBAAmB,EAAE,CAAC;IAC/B,CAAC;CACF,CAAC","sourcesContent":["import { type PermissionResponse, PermissionStatus } from 'expo';\nimport { UnavailabilityError } from 'expo-modules-core';\n\nimport type { LocationLastKnownOptions, LocationObject, LocationOptions } from './Location.types';\nimport { LocationAccuracy } from './Location.types';\nimport { LocationEventEmitter } from './LocationEventEmitter';\n\nclass GeocoderError extends Error {\n code: string;\n\n constructor() {\n super('Geocoder service is not available for this device.');\n this.code = 'E_NO_GEOCODER';\n }\n}\n\n/**\n * Converts `GeolocationPosition` to JavaScript object.\n */\nfunction geolocationPositionToJSON(position: LocationObject): LocationObject {\n const { coords, timestamp } = position;\n return {\n coords: {\n latitude: coords.latitude,\n longitude: coords.longitude,\n altitude: coords.altitude,\n accuracy: coords.accuracy,\n altitudeAccuracy: coords.altitudeAccuracy,\n heading: coords.heading,\n speed: coords.speed,\n },\n timestamp,\n };\n}\n\n/**\n * Checks whether given location didn't exceed given `maxAge` and fits in the required accuracy.\n */\nfunction isLocationValid(location: LocationObject, options: LocationLastKnownOptions): boolean {\n const maxAge = typeof options.maxAge === 'number' ? options.maxAge : Infinity;\n const requiredAccuracy =\n typeof options.requiredAccuracy === 'number' ? options.requiredAccuracy : Infinity;\n const locationAccuracy = location.coords.accuracy ?? Infinity;\n\n return Date.now() - location.timestamp <= maxAge && locationAccuracy <= requiredAccuracy;\n}\n\n/**\n * Gets the permission details. The implementation is not very good as it's not\n * possible to query for permission on all browsers, apparently only the\n * latest versions will support this.\n */\nasync function getPermissionsAsync(shouldAsk = false): Promise<PermissionResponse> {\n if (!navigator?.permissions?.query) {\n throw new UnavailabilityError('expo-location', 'navigator.permissions API is not available');\n }\n\n const permission = await navigator.permissions.query({ name: 'geolocation' });\n\n if (permission.state === 'granted') {\n return {\n status: PermissionStatus.GRANTED,\n granted: true,\n canAskAgain: true,\n expires: 0,\n };\n }\n\n if (permission.state === 'denied') {\n return {\n status: PermissionStatus.DENIED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n };\n }\n\n if (shouldAsk) {\n return new Promise((resolve) => {\n navigator.geolocation.getCurrentPosition(\n () => {\n resolve({\n status: PermissionStatus.GRANTED,\n granted: true,\n canAskAgain: true,\n expires: 0,\n });\n },\n (positionError: GeolocationPositionError) => {\n if (positionError.code === positionError.PERMISSION_DENIED) {\n resolve({\n status: PermissionStatus.DENIED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n });\n return;\n }\n\n resolve({\n status: PermissionStatus.GRANTED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n });\n }\n );\n });\n }\n\n // The permission state is 'prompt' when the permission has not been requested\n // yet, tested on Chrome.\n return {\n status: PermissionStatus.UNDETERMINED,\n granted: false,\n canAskAgain: true,\n expires: 0,\n };\n}\n\nlet lastKnownPosition: LocationObject | null = null;\n\nexport default {\n async getProviderStatusAsync(): Promise<{ locationServicesEnabled: boolean }> {\n return {\n locationServicesEnabled: 'geolocation' in navigator,\n };\n },\n async getLastKnownPositionAsync(\n options: LocationLastKnownOptions = {}\n ): Promise<LocationObject | null> {\n if (lastKnownPosition && isLocationValid(lastKnownPosition, options)) {\n return lastKnownPosition;\n }\n return null;\n },\n async getCurrentPositionAsync(options: LocationOptions): Promise<LocationObject> {\n return new Promise<LocationObject>((resolve, reject) => {\n const resolver: PositionCallback = (position) => {\n lastKnownPosition = geolocationPositionToJSON(position);\n resolve(lastKnownPosition);\n };\n navigator.geolocation.getCurrentPosition(resolver, reject, {\n maximumAge: Infinity,\n enableHighAccuracy: (options.accuracy ?? 0) > LocationAccuracy.Balanced,\n ...options,\n });\n });\n },\n async removeWatchAsync(watchId: number): Promise<void> {\n navigator.geolocation.clearWatch(watchId);\n },\n async watchDeviceHeading(_headingId: number): Promise<void> {\n console.warn('Location.watchDeviceHeading: is not supported on web');\n },\n async hasServicesEnabledAsync(): Promise<boolean> {\n return 'geolocation' in navigator;\n },\n async geocodeAsync(): Promise<any[]> {\n throw new GeocoderError();\n },\n async reverseGeocodeAsync(): Promise<any[]> {\n throw new GeocoderError();\n },\n async watchPositionImplAsync(watchId: number, options: PositionOptions): Promise<number> {\n return new Promise((resolve) => {\n watchId = navigator.geolocation.watchPosition(\n (position) => {\n lastKnownPosition = geolocationPositionToJSON(position);\n LocationEventEmitter.emit('Expo.locationChanged', {\n watchId,\n location: lastKnownPosition,\n });\n },\n undefined,\n options\n );\n resolve(watchId);\n });\n },\n\n async requestForegroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync(true);\n },\n async requestBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync(true);\n },\n async getForegroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync();\n },\n async getBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return getPermissionsAsync();\n },\n};\n"]}
|
package/build/Location.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PermissionResponse } from 'expo';
|
|
2
2
|
import type { LocationErrorCallback, LocationCallback, LocationGeocodedAddress, LocationGeocodedLocation, LocationHeadingCallback, LocationHeadingObject, LocationLastKnownOptions, LocationObject, LocationOptions, LocationPermissionResponse, LocationProviderStatus, LocationRegion, LocationSubscription, LocationTaskOptions } from './Location.types';
|
|
3
3
|
/**
|
|
4
4
|
* Check status of location providers.
|
package/build/Location.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../src/Location.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Location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AO,CAAC,IAAI,CAAC,CAIf;AAGD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE;AAGD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGlF"}
|
package/build/Location.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isRunningInExpoGo } from 'expo';
|
|
2
|
-
import {
|
|
1
|
+
import { createPermissionHook, isRunningInExpoGo } from 'expo';
|
|
2
|
+
import { Platform } from 'expo-modules-core';
|
|
3
3
|
import ExpoLocation from './ExpoLocation';
|
|
4
4
|
import { LocationAccuracy } from './Location.types';
|
|
5
5
|
import { LocationSubscriber, HeadingSubscriber, LocationErrorSubscriber, } from './LocationSubscribers';
|
package/build/Location.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../src/Location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAiB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAE/B,4EAA4E;AAC5E,IAAI,wBAAwB,GAAG,KAAK,CAAC;AAErC,cAAc;AACd;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,OAAO,YAAY,CAAC,sBAAsB,EAAE,CAAC;AAC/C,CAAC;AAED,cAAc;AACd;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B;IAC9C,kFAAkF;IAClF,qGAAqG;IACrG,+GA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AAC;AAED,cAAc;AACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,QAAgB,EAChB,UAA4B,EAAE;IAE9B,SAAS,CAAC,QAAQ,CAAC,CAAC;IACpB,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC1B,MAAM,YAAY,CAAC,oBAAoB,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,cAAc;AACd;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,QAAgB;IACxD,SAAS,CAAC,QAAQ,CAAC,CAAC;IACpB,MAAM,YAAY,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,QAAgB;IAC9D,SAAS,CAAC,QAAQ,CAAC,CAAC;IACpB,OAAO,YAAY,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { isRunningInExpoGo } from 'expo';\nimport type { PermissionResponse } from 'expo-modules-core';\nimport { createPermissionHook, Platform } from 'expo-modules-core';\n\nimport ExpoLocation from './ExpoLocation';\nimport type {\n LocationErrorCallback,\n LocationCallback,\n LocationGeocodedAddress,\n LocationGeocodedLocation,\n LocationHeadingCallback,\n LocationHeadingObject,\n LocationLastKnownOptions,\n LocationObject,\n LocationOptions,\n LocationPermissionResponse,\n LocationProviderStatus,\n LocationRegion,\n LocationSubscription,\n LocationTaskOptions,\n} from './Location.types';\nimport { LocationAccuracy } from './Location.types';\nimport {\n LocationSubscriber,\n HeadingSubscriber,\n LocationErrorSubscriber,\n} from './LocationSubscribers';\n\n// Flag for warning about background services not being available in Expo Go\nlet warnAboutExpoGoDisplayed = false;\n\n// @needsAudit\n/**\n * Check status of location providers.\n * @return A promise which fulfills with an object of type [`LocationProviderStatus`](#locationproviderstatus).\n */\nexport async function getProviderStatusAsync(): Promise<LocationProviderStatus> {\n return ExpoLocation.getProviderStatusAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to turn on high accuracy location mode which enables network provider that uses\n * Google Play services to improve location accuracy and location-based services.\n * @return A promise resolving as soon as the user accepts the dialog. Rejects if denied.\n *\n * @platform android\n */\nexport async function enableNetworkProviderAsync(): Promise<void> {\n // If network provider is disabled (user's location mode is set to \"Device only\"),\n // Android's location provider may not give you any results. Use this method in order to ask the user\n // to change the location mode to \"High accuracy\" which uses Google Play services and enables network provider.\n // `getCurrentPositionAsync` and `watchPositionAsync` are doing it automatically anyway.\n\n if (Platform.OS === 'android') {\n return ExpoLocation.enableNetworkProviderAsync();\n }\n}\n\n// @needsAudit\n/**\n * Requests for one-time delivery of the user's current location.\n * Depending on given `accuracy` option it may take some time to resolve,\n * especially when you're inside a building.\n * > __Note:__ Calling it causes the location manager to obtain a location fix which may take several\n * > seconds. Consider using [`getLastKnownPositionAsync`](#locationgetlastknownpositionasyncoptions)\n * > if you expect to get a quick response and high accuracy is not required.\n * @param options\n * @return A promise which fulfills with an object of type [`LocationObject`](#locationobject).\n */\nexport async function getCurrentPositionAsync(\n options: LocationOptions = {}\n): Promise<LocationObject> {\n return ExpoLocation.getCurrentPositionAsync(options);\n}\n\n// @needsAudit\n/**\n * Gets the last known position of the device or `null` if it's not available or doesn't match given\n * requirements such as maximum age or required accuracy.\n * It's considered to be faster than `getCurrentPositionAsync` as it doesn't request for the current\n * location, but keep in mind the returned location may not be up-to-date.\n * @param options\n * @return A promise which fulfills with an object of type [`LocationObject`](#locationobject) or\n * `null` if it's not available or doesn't match given requirements such as maximum age or required\n * accuracy.\n */\nexport async function getLastKnownPositionAsync(\n options: LocationLastKnownOptions = {}\n): Promise<LocationObject | null> {\n return ExpoLocation.getLastKnownPositionAsync(options);\n}\n\n// @needsAudit\n/**\n * Subscribe to location updates from the device. Updates will only occur while the application is in\n * the foreground. To get location updates while in background you'll need to use\n * [`startLocationUpdatesAsync`](#locationstartlocationupdatesasynctaskname-options).\n * @param options\n * @param callback This function is called on each location update. It receives an object of type\n * [`LocationObject`](#locationobject) as the first argument.\n * @param errorHandler This function is called when an error occurs. It receives a string with the\n * error message as the first argument.\n * @return A promise which fulfills with a [`LocationSubscription`](#locationsubscription) object.\n */\nexport async function watchPositionAsync(\n options: LocationOptions,\n callback: LocationCallback,\n errorHandler?: LocationErrorCallback\n): Promise<LocationSubscription> {\n const watchId = LocationSubscriber.registerCallback(callback);\n errorHandler && LocationErrorSubscriber.registerCallbackForId(watchId, errorHandler);\n\n await ExpoLocation.watchPositionImplAsync(watchId, options);\n\n return {\n remove() {\n LocationSubscriber.unregisterCallback(watchId);\n errorHandler && LocationErrorSubscriber.unregisterCallback(watchId);\n },\n };\n}\n\n// @needsAudit\n/**\n * Gets the current heading information from the device. To simplify, it calls `watchHeadingAsync`\n * and waits for a couple of updates, and then returns the one that is accurate enough.\n * @return A promise which fulfills with an object of type [`LocationHeadingObject`](#locationheadingobject).\n */\nexport async function getHeadingAsync(): Promise<LocationHeadingObject> {\n return new Promise(async (resolve, reject) => {\n let tries = 0;\n let subscriber: LocationSubscription | undefined = undefined;\n\n try {\n subscriber = await watchHeadingAsync(\n (heading) => {\n if (heading.accuracy > 1 || tries > 5) {\n subscriber?.remove();\n resolve(heading);\n } else {\n tries += 1;\n }\n },\n (reason) => {\n subscriber?.remove();\n reject(reason);\n }\n );\n } catch (e) {\n reject(e);\n }\n });\n}\n\n// @needsAudit\n/**\n * Subscribe to compass updates from the device.\n *\n * @param callback This function is called on each compass update. It receives an object of type\n * [LocationHeadingObject](#locationheadingobject) as the first argument.\n * @param errorHandler This function is called when an error occurs. It receives a string with the\n * error message as the first argument.\n * @return A promise which fulfills with a [`LocationSubscription`](#locationsubscription) object.\n *\n * @platform android\n * @platform ios\n */\nexport async function watchHeadingAsync(\n callback: LocationHeadingCallback,\n errorHandler?: LocationErrorCallback\n): Promise<LocationSubscription> {\n const watchId = HeadingSubscriber.registerCallback(callback);\n errorHandler && LocationErrorSubscriber.registerCallbackForId(watchId, errorHandler);\n\n await ExpoLocation.watchDeviceHeading(watchId);\n\n return {\n remove() {\n HeadingSubscriber.unregisterCallback(watchId);\n errorHandler && LocationErrorSubscriber.unregisterCallback(watchId);\n },\n };\n}\n\n// @needsAudit\n/**\n * Geocode an address string to latitude-longitude location.\n *\n * On Android, you must request location permissions with [`requestForegroundPermissionsAsync`](#locationrequestforegroundpermissionsasync)\n * before geocoding can be used.\n *\n * > **Note**: Geocoding is resource consuming and has to be used reasonably. Creating too many\n * > requests at a time can result in an error, so they have to be managed properly.\n * > It's also discouraged to use geocoding while the app is in the background and its results won't\n * > be shown to the user immediately.\n *\n * @param address A string representing address, eg. `\"Baker Street London\"`.\n * @return A promise which fulfills with an array (in most cases its size is 1) of [`LocationGeocodedLocation`](#locationgeocodedlocation)\n * objects.\n *\n * @platform android\n * @platform ios\n */\nexport async function geocodeAsync(address: string): Promise<LocationGeocodedLocation[]> {\n if (typeof address !== 'string') {\n throw new TypeError(`Address to geocode must be a string. Got ${address} instead.`);\n }\n\n if (Platform.OS === 'web') {\n if (__DEV__) {\n console.warn(\n 'The Geocoding API has been removed in SDK 49, use Place Autocomplete service instead' +\n '(https://developers.google.com/maps/documentation/places/web-service/autocomplete)'\n );\n }\n return [];\n }\n\n return await ExpoLocation.geocodeAsync(address);\n}\n\n// @needsAudit\n/**\n * Reverse geocode a location to postal address.\n *\n * On Android, you must request location permissions with [`requestForegroundPermissionsAsync`](#locationrequestforegroundpermissionsasync)\n * before geocoding can be used.\n *\n * > **Note**: Geocoding is resource consuming and has to be used reasonably. Creating too many\n * > requests at a time can result in an error, so they have to be managed properly.\n * > It's also discouraged to use geocoding while the app is in the background and its results won't\n * > be shown to the user immediately.\n *\n * @param location An object representing a location.\n * @return A promise which fulfills with an array (in most cases its size is 1) of [`LocationGeocodedAddress`](#locationgeocodedaddress) objects.\n *\n * @platform android\n * @platform ios\n */\nexport async function reverseGeocodeAsync(\n location: Pick<LocationGeocodedLocation, 'latitude' | 'longitude'>\n): Promise<LocationGeocodedAddress[]> {\n if (typeof location.latitude !== 'number' || typeof location.longitude !== 'number') {\n throw new TypeError(\n 'Location to reverse-geocode must be an object with number properties `latitude` and `longitude`.'\n );\n }\n\n if (Platform.OS === 'web') {\n if (__DEV__) {\n console.warn(\n 'The Geocoding API has been removed in SDK 49, use Place Autocomplete service instead' +\n '(https://developers.google.com/maps/documentation/places/web-service/autocomplete)'\n );\n }\n return [];\n }\n\n return await ExpoLocation.reverseGeocodeAsync(location);\n}\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing location while the app is in the foreground.\n * @return A promise that fulfills with an object of type [`LocationPermissionResponse`](#locationpermissionresponse).\n */\nexport async function getForegroundPermissionsAsync(): Promise<LocationPermissionResponse> {\n return await ExpoLocation.getForegroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for location while the app is in the foreground.\n * @return A promise that fulfills with an object of type [`LocationPermissionResponse`](#locationpermissionresponse).\n */\nexport async function requestForegroundPermissionsAsync(): Promise<LocationPermissionResponse> {\n return await ExpoLocation.requestForegroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Check or request permissions for the foreground location.\n * This uses both `requestForegroundPermissionsAsync` and `getForegroundPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = Location.useForegroundPermissions();\n * ```\n */\nexport const useForegroundPermissions = createPermissionHook({\n getMethod: getForegroundPermissionsAsync,\n requestMethod: requestForegroundPermissionsAsync,\n});\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing location while the app is in the background.\n * @return A promise that fulfills with an object of type [`PermissionResponse`](#permissionresponse).\n */\nexport async function getBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return await ExpoLocation.getBackgroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for location while the app is in the background.\n * On __Android 11 or higher__: this method will open the system settings page - before that happens\n * you should explain to the user why your application needs background location permission.\n * For example, you can use `Modal` component from `react-native` to do that.\n * > __Note__: Foreground permissions should be granted before asking for the background permissions\n * (your app can't obtain background permission without foreground permission).\n * @return A promise that fulfills with an object of type [`PermissionResponse`](#permissionresponse).\n */\nexport async function requestBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return await ExpoLocation.requestBackgroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Check or request permissions for the background location.\n * This uses both `requestBackgroundPermissionsAsync` and `getBackgroundPermissionsAsync` to\n * interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = Location.useBackgroundPermissions();\n * ```\n */\nexport const useBackgroundPermissions = createPermissionHook({\n getMethod: getBackgroundPermissionsAsync,\n requestMethod: requestBackgroundPermissionsAsync,\n});\n\n// --- Location service\n\n// @needsAudit\n/**\n * Checks whether location services are enabled by the user.\n * @return A promise which fulfills to `true` if location services are enabled on the device,\n * or `false` if not.\n */\nexport async function hasServicesEnabledAsync(): Promise<boolean> {\n return await ExpoLocation.hasServicesEnabledAsync();\n}\n\n// --- Background location updates\n\nfunction _validate(taskName: string) {\n if (!taskName || typeof taskName !== 'string') {\n throw new Error(`\\`taskName\\` must be a non-empty string. Got ${taskName} instead.`);\n }\n if (isRunningInExpoGo()) {\n if (!warnAboutExpoGoDisplayed) {\n const message =\n 'Background location is limited in Expo Go:\\n' +\n 'On Android, it is not available at all.\\n' +\n 'On iOS, it works when running in the Simulator.\\n' +\n 'You can use this API, and all others, in a development build. Learn more: https://expo.fyi/dev-client.';\n console.warn(message);\n warnAboutExpoGoDisplayed = true;\n }\n }\n}\n\n// @docsMissing\nexport async function isBackgroundLocationAvailableAsync(): Promise<boolean> {\n const providerStatus = await getProviderStatusAsync();\n return providerStatus.backgroundModeEnabled;\n}\n\n// @needsAudit\n/**\n * Registers for receiving location updates that can also come when the app is in the background.\n *\n * # Task parameters\n *\n * Background location task will be receiving following data:\n * - `locations` - An array of the new locations.\n *\n * @example\n * ```ts\n * import * as TaskManager from 'expo-task-manager';\n *\n * TaskManager.defineTask(YOUR_TASK_NAME, ({ data: { locations }, error }) => {\n * if (error) {\n * // check `error.message` for more details.\n * return;\n * }\n * console.log('Received new locations', locations);\n * });\n * ```\n *\n * @param taskName Name of the task receiving location updates.\n * @param options An object of options passed to the location manager.\n *\n * @return A promise resolving once the task with location updates is registered.\n */\nexport async function startLocationUpdatesAsync(\n taskName: string,\n options: LocationTaskOptions = { accuracy: LocationAccuracy.Balanced }\n): Promise<void> {\n _validate(taskName);\n await ExpoLocation.startLocationUpdatesAsync(taskName, options);\n}\n\n// @needsAudit\n/**\n * Stops location updates for specified task.\n * @param taskName Name of the background location task to stop.\n * @return A promise resolving as soon as the task is unregistered.\n */\nexport async function stopLocationUpdatesAsync(taskName: string): Promise<void> {\n _validate(taskName);\n await ExpoLocation.stopLocationUpdatesAsync(taskName);\n}\n\n// @needsAudit\n/**\n * @param taskName Name of the location task to check.\n * @return A promise which fulfills with boolean value indicating whether the location task is\n * started or not.\n */\nexport async function hasStartedLocationUpdatesAsync(taskName: string): Promise<boolean> {\n _validate(taskName);\n return ExpoLocation.hasStartedLocationUpdatesAsync(taskName);\n}\n\n// --- Geofencing\n\nfunction _validateRegions(regions: LocationRegion[]) {\n if (!regions || regions.length === 0) {\n throw new Error(\n 'Regions array cannot be empty. Use `stopGeofencingAsync` if you want to stop geofencing all regions'\n );\n }\n for (const region of regions) {\n if (typeof region.latitude !== 'number') {\n throw new TypeError(`Region's latitude must be a number. Got '${region.latitude}' instead.`);\n }\n if (typeof region.longitude !== 'number') {\n throw new TypeError(\n `Region's longitude must be a number. Got '${region.longitude}' instead.`\n );\n }\n if (typeof region.radius !== 'number') {\n throw new TypeError(`Region's radius must be a number. Got '${region.radius}' instead.`);\n }\n }\n}\n\n// @needsAudit\n/**\n * Starts geofencing for given regions. When the new event comes, the task with specified name will\n * be called with the region that the device enter to or exit from.\n * If you want to add or remove regions from already running geofencing task, you can just call\n * `startGeofencingAsync` again with the new array of regions.\n *\n * # Task parameters\n *\n * Geofencing task will be receiving following data:\n * - `eventType` - Indicates the reason for calling the task, which can be triggered by entering or exiting the region.\n * See [`GeofencingEventType`](#geofencingeventtype).\n * - `region` - Object containing details about updated region. See [`LocationRegion`](#locationregion) for more details.\n *\n * @param taskName Name of the task that will be called when the device enters or exits from specified regions.\n * @param regions Array of region objects to be geofenced.\n *\n * @return A promise resolving as soon as the task is registered.\n *\n * @example\n * ```ts\n * import { GeofencingEventType } from 'expo-location';\n * import * as TaskManager from 'expo-task-manager';\n *\n * TaskManager.defineTask(YOUR_TASK_NAME, ({ data: { eventType, region }, error }) => {\n * if (error) {\n * // check `error.message` for more details.\n * return;\n * }\n * if (eventType === GeofencingEventType.Enter) {\n * console.log(\"You've entered region:\", region);\n * } else if (eventType === GeofencingEventType.Exit) {\n * console.log(\"You've left region:\", region);\n * }\n * });\n * ```\n */\nexport async function startGeofencingAsync(\n taskName: string,\n regions: LocationRegion[] = []\n): Promise<void> {\n _validate(taskName);\n _validateRegions(regions);\n await ExpoLocation.startGeofencingAsync(taskName, { regions });\n}\n\n// @needsAudit\n/**\n * Stops geofencing for specified task. It unregisters the background task so the app will not be\n * receiving any updates, especially in the background.\n * @param taskName Name of the task to unregister.\n * @return A promise resolving as soon as the task is unregistered.\n */\nexport async function stopGeofencingAsync(taskName: string): Promise<void> {\n _validate(taskName);\n await ExpoLocation.stopGeofencingAsync(taskName);\n}\n\n// @needsAudit\n/**\n * @param taskName Name of the geofencing task to check.\n * @return A promise which fulfills with boolean value indicating whether the geofencing task is\n * started or not.\n */\nexport async function hasStartedGeofencingAsync(taskName: string): Promise<boolean> {\n _validate(taskName);\n return ExpoLocation.hasStartedGeofencingAsync(taskName);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../src/Location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAA2B,MAAM,MAAM,CAAC;AACxF,OAAO,EAAE,QAAQ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expo-modules-core';\n\nimport ExpoLocation from './ExpoLocation';\nimport type {\n LocationErrorCallback,\n LocationCallback,\n LocationGeocodedAddress,\n LocationGeocodedLocation,\n LocationHeadingCallback,\n LocationHeadingObject,\n LocationLastKnownOptions,\n LocationObject,\n LocationOptions,\n LocationPermissionResponse,\n LocationProviderStatus,\n LocationRegion,\n LocationSubscription,\n LocationTaskOptions,\n} from './Location.types';\nimport { LocationAccuracy } from './Location.types';\nimport {\n LocationSubscriber,\n HeadingSubscriber,\n LocationErrorSubscriber,\n} from './LocationSubscribers';\n\n// Flag for warning about background services not being available in Expo Go\nlet warnAboutExpoGoDisplayed = false;\n\n// @needsAudit\n/**\n * Check status of location providers.\n * @return A promise which fulfills with an object of type [`LocationProviderStatus`](#locationproviderstatus).\n */\nexport async function getProviderStatusAsync(): Promise<LocationProviderStatus> {\n return ExpoLocation.getProviderStatusAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to turn on high accuracy location mode which enables network provider that uses\n * Google Play services to improve location accuracy and location-based services.\n * @return A promise resolving as soon as the user accepts the dialog. Rejects if denied.\n *\n * @platform android\n */\nexport async function enableNetworkProviderAsync(): Promise<void> {\n // If network provider is disabled (user's location mode is set to \"Device only\"),\n // Android's location provider may not give you any results. Use this method in order to ask the user\n // to change the location mode to \"High accuracy\" which uses Google Play services and enables network provider.\n // `getCurrentPositionAsync` and `watchPositionAsync` are doing it automatically anyway.\n\n if (Platform.OS === 'android') {\n return ExpoLocation.enableNetworkProviderAsync();\n }\n}\n\n// @needsAudit\n/**\n * Requests for one-time delivery of the user's current location.\n * Depending on given `accuracy` option it may take some time to resolve,\n * especially when you're inside a building.\n * > __Note:__ Calling it causes the location manager to obtain a location fix which may take several\n * > seconds. Consider using [`getLastKnownPositionAsync`](#locationgetlastknownpositionasyncoptions)\n * > if you expect to get a quick response and high accuracy is not required.\n * @param options\n * @return A promise which fulfills with an object of type [`LocationObject`](#locationobject).\n */\nexport async function getCurrentPositionAsync(\n options: LocationOptions = {}\n): Promise<LocationObject> {\n return ExpoLocation.getCurrentPositionAsync(options);\n}\n\n// @needsAudit\n/**\n * Gets the last known position of the device or `null` if it's not available or doesn't match given\n * requirements such as maximum age or required accuracy.\n * It's considered to be faster than `getCurrentPositionAsync` as it doesn't request for the current\n * location, but keep in mind the returned location may not be up-to-date.\n * @param options\n * @return A promise which fulfills with an object of type [`LocationObject`](#locationobject) or\n * `null` if it's not available or doesn't match given requirements such as maximum age or required\n * accuracy.\n */\nexport async function getLastKnownPositionAsync(\n options: LocationLastKnownOptions = {}\n): Promise<LocationObject | null> {\n return ExpoLocation.getLastKnownPositionAsync(options);\n}\n\n// @needsAudit\n/**\n * Subscribe to location updates from the device. Updates will only occur while the application is in\n * the foreground. To get location updates while in background you'll need to use\n * [`startLocationUpdatesAsync`](#locationstartlocationupdatesasynctaskname-options).\n * @param options\n * @param callback This function is called on each location update. It receives an object of type\n * [`LocationObject`](#locationobject) as the first argument.\n * @param errorHandler This function is called when an error occurs. It receives a string with the\n * error message as the first argument.\n * @return A promise which fulfills with a [`LocationSubscription`](#locationsubscription) object.\n */\nexport async function watchPositionAsync(\n options: LocationOptions,\n callback: LocationCallback,\n errorHandler?: LocationErrorCallback\n): Promise<LocationSubscription> {\n const watchId = LocationSubscriber.registerCallback(callback);\n errorHandler && LocationErrorSubscriber.registerCallbackForId(watchId, errorHandler);\n\n await ExpoLocation.watchPositionImplAsync(watchId, options);\n\n return {\n remove() {\n LocationSubscriber.unregisterCallback(watchId);\n errorHandler && LocationErrorSubscriber.unregisterCallback(watchId);\n },\n };\n}\n\n// @needsAudit\n/**\n * Gets the current heading information from the device. To simplify, it calls `watchHeadingAsync`\n * and waits for a couple of updates, and then returns the one that is accurate enough.\n * @return A promise which fulfills with an object of type [`LocationHeadingObject`](#locationheadingobject).\n */\nexport async function getHeadingAsync(): Promise<LocationHeadingObject> {\n return new Promise(async (resolve, reject) => {\n let tries = 0;\n let subscriber: LocationSubscription | undefined = undefined;\n\n try {\n subscriber = await watchHeadingAsync(\n (heading) => {\n if (heading.accuracy > 1 || tries > 5) {\n subscriber?.remove();\n resolve(heading);\n } else {\n tries += 1;\n }\n },\n (reason) => {\n subscriber?.remove();\n reject(reason);\n }\n );\n } catch (e) {\n reject(e);\n }\n });\n}\n\n// @needsAudit\n/**\n * Subscribe to compass updates from the device.\n *\n * @param callback This function is called on each compass update. It receives an object of type\n * [LocationHeadingObject](#locationheadingobject) as the first argument.\n * @param errorHandler This function is called when an error occurs. It receives a string with the\n * error message as the first argument.\n * @return A promise which fulfills with a [`LocationSubscription`](#locationsubscription) object.\n *\n * @platform android\n * @platform ios\n */\nexport async function watchHeadingAsync(\n callback: LocationHeadingCallback,\n errorHandler?: LocationErrorCallback\n): Promise<LocationSubscription> {\n const watchId = HeadingSubscriber.registerCallback(callback);\n errorHandler && LocationErrorSubscriber.registerCallbackForId(watchId, errorHandler);\n\n await ExpoLocation.watchDeviceHeading(watchId);\n\n return {\n remove() {\n HeadingSubscriber.unregisterCallback(watchId);\n errorHandler && LocationErrorSubscriber.unregisterCallback(watchId);\n },\n };\n}\n\n// @needsAudit\n/**\n * Geocode an address string to latitude-longitude location.\n *\n * On Android, you must request location permissions with [`requestForegroundPermissionsAsync`](#locationrequestforegroundpermissionsasync)\n * before geocoding can be used.\n *\n * > **Note**: Geocoding is resource consuming and has to be used reasonably. Creating too many\n * > requests at a time can result in an error, so they have to be managed properly.\n * > It's also discouraged to use geocoding while the app is in the background and its results won't\n * > be shown to the user immediately.\n *\n * @param address A string representing address, eg. `\"Baker Street London\"`.\n * @return A promise which fulfills with an array (in most cases its size is 1) of [`LocationGeocodedLocation`](#locationgeocodedlocation)\n * objects.\n *\n * @platform android\n * @platform ios\n */\nexport async function geocodeAsync(address: string): Promise<LocationGeocodedLocation[]> {\n if (typeof address !== 'string') {\n throw new TypeError(`Address to geocode must be a string. Got ${address} instead.`);\n }\n\n if (Platform.OS === 'web') {\n if (__DEV__) {\n console.warn(\n 'The Geocoding API has been removed in SDK 49, use Place Autocomplete service instead' +\n '(https://developers.google.com/maps/documentation/places/web-service/autocomplete)'\n );\n }\n return [];\n }\n\n return await ExpoLocation.geocodeAsync(address);\n}\n\n// @needsAudit\n/**\n * Reverse geocode a location to postal address.\n *\n * On Android, you must request location permissions with [`requestForegroundPermissionsAsync`](#locationrequestforegroundpermissionsasync)\n * before geocoding can be used.\n *\n * > **Note**: Geocoding is resource consuming and has to be used reasonably. Creating too many\n * > requests at a time can result in an error, so they have to be managed properly.\n * > It's also discouraged to use geocoding while the app is in the background and its results won't\n * > be shown to the user immediately.\n *\n * @param location An object representing a location.\n * @return A promise which fulfills with an array (in most cases its size is 1) of [`LocationGeocodedAddress`](#locationgeocodedaddress) objects.\n *\n * @platform android\n * @platform ios\n */\nexport async function reverseGeocodeAsync(\n location: Pick<LocationGeocodedLocation, 'latitude' | 'longitude'>\n): Promise<LocationGeocodedAddress[]> {\n if (typeof location.latitude !== 'number' || typeof location.longitude !== 'number') {\n throw new TypeError(\n 'Location to reverse-geocode must be an object with number properties `latitude` and `longitude`.'\n );\n }\n\n if (Platform.OS === 'web') {\n if (__DEV__) {\n console.warn(\n 'The Geocoding API has been removed in SDK 49, use Place Autocomplete service instead' +\n '(https://developers.google.com/maps/documentation/places/web-service/autocomplete)'\n );\n }\n return [];\n }\n\n return await ExpoLocation.reverseGeocodeAsync(location);\n}\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing location while the app is in the foreground.\n * @return A promise that fulfills with an object of type [`LocationPermissionResponse`](#locationpermissionresponse).\n */\nexport async function getForegroundPermissionsAsync(): Promise<LocationPermissionResponse> {\n return await ExpoLocation.getForegroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for location while the app is in the foreground.\n * @return A promise that fulfills with an object of type [`LocationPermissionResponse`](#locationpermissionresponse).\n */\nexport async function requestForegroundPermissionsAsync(): Promise<LocationPermissionResponse> {\n return await ExpoLocation.requestForegroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Check or request permissions for the foreground location.\n * This uses both `requestForegroundPermissionsAsync` and `getForegroundPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = Location.useForegroundPermissions();\n * ```\n */\nexport const useForegroundPermissions = createPermissionHook({\n getMethod: getForegroundPermissionsAsync,\n requestMethod: requestForegroundPermissionsAsync,\n});\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing location while the app is in the background.\n * @return A promise that fulfills with an object of type [`PermissionResponse`](#permissionresponse).\n */\nexport async function getBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return await ExpoLocation.getBackgroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for location while the app is in the background.\n * On __Android 11 or higher__: this method will open the system settings page - before that happens\n * you should explain to the user why your application needs background location permission.\n * For example, you can use `Modal` component from `react-native` to do that.\n * > __Note__: Foreground permissions should be granted before asking for the background permissions\n * (your app can't obtain background permission without foreground permission).\n * @return A promise that fulfills with an object of type [`PermissionResponse`](#permissionresponse).\n */\nexport async function requestBackgroundPermissionsAsync(): Promise<PermissionResponse> {\n return await ExpoLocation.requestBackgroundPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Check or request permissions for the background location.\n * This uses both `requestBackgroundPermissionsAsync` and `getBackgroundPermissionsAsync` to\n * interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = Location.useBackgroundPermissions();\n * ```\n */\nexport const useBackgroundPermissions = createPermissionHook({\n getMethod: getBackgroundPermissionsAsync,\n requestMethod: requestBackgroundPermissionsAsync,\n});\n\n// --- Location service\n\n// @needsAudit\n/**\n * Checks whether location services are enabled by the user.\n * @return A promise which fulfills to `true` if location services are enabled on the device,\n * or `false` if not.\n */\nexport async function hasServicesEnabledAsync(): Promise<boolean> {\n return await ExpoLocation.hasServicesEnabledAsync();\n}\n\n// --- Background location updates\n\nfunction _validate(taskName: string) {\n if (!taskName || typeof taskName !== 'string') {\n throw new Error(`\\`taskName\\` must be a non-empty string. Got ${taskName} instead.`);\n }\n if (isRunningInExpoGo()) {\n if (!warnAboutExpoGoDisplayed) {\n const message =\n 'Background location is limited in Expo Go:\\n' +\n 'On Android, it is not available at all.\\n' +\n 'On iOS, it works when running in the Simulator.\\n' +\n 'You can use this API, and all others, in a development build. Learn more: https://expo.fyi/dev-client.';\n console.warn(message);\n warnAboutExpoGoDisplayed = true;\n }\n }\n}\n\n// @docsMissing\nexport async function isBackgroundLocationAvailableAsync(): Promise<boolean> {\n const providerStatus = await getProviderStatusAsync();\n return providerStatus.backgroundModeEnabled;\n}\n\n// @needsAudit\n/**\n * Registers for receiving location updates that can also come when the app is in the background.\n *\n * # Task parameters\n *\n * Background location task will be receiving following data:\n * - `locations` - An array of the new locations.\n *\n * @example\n * ```ts\n * import * as TaskManager from 'expo-task-manager';\n *\n * TaskManager.defineTask(YOUR_TASK_NAME, ({ data: { locations }, error }) => {\n * if (error) {\n * // check `error.message` for more details.\n * return;\n * }\n * console.log('Received new locations', locations);\n * });\n * ```\n *\n * @param taskName Name of the task receiving location updates.\n * @param options An object of options passed to the location manager.\n *\n * @return A promise resolving once the task with location updates is registered.\n */\nexport async function startLocationUpdatesAsync(\n taskName: string,\n options: LocationTaskOptions = { accuracy: LocationAccuracy.Balanced }\n): Promise<void> {\n _validate(taskName);\n await ExpoLocation.startLocationUpdatesAsync(taskName, options);\n}\n\n// @needsAudit\n/**\n * Stops location updates for specified task.\n * @param taskName Name of the background location task to stop.\n * @return A promise resolving as soon as the task is unregistered.\n */\nexport async function stopLocationUpdatesAsync(taskName: string): Promise<void> {\n _validate(taskName);\n await ExpoLocation.stopLocationUpdatesAsync(taskName);\n}\n\n// @needsAudit\n/**\n * @param taskName Name of the location task to check.\n * @return A promise which fulfills with boolean value indicating whether the location task is\n * started or not.\n */\nexport async function hasStartedLocationUpdatesAsync(taskName: string): Promise<boolean> {\n _validate(taskName);\n return ExpoLocation.hasStartedLocationUpdatesAsync(taskName);\n}\n\n// --- Geofencing\n\nfunction _validateRegions(regions: LocationRegion[]) {\n if (!regions || regions.length === 0) {\n throw new Error(\n 'Regions array cannot be empty. Use `stopGeofencingAsync` if you want to stop geofencing all regions'\n );\n }\n for (const region of regions) {\n if (typeof region.latitude !== 'number') {\n throw new TypeError(`Region's latitude must be a number. Got '${region.latitude}' instead.`);\n }\n if (typeof region.longitude !== 'number') {\n throw new TypeError(\n `Region's longitude must be a number. Got '${region.longitude}' instead.`\n );\n }\n if (typeof region.radius !== 'number') {\n throw new TypeError(`Region's radius must be a number. Got '${region.radius}' instead.`);\n }\n }\n}\n\n// @needsAudit\n/**\n * Starts geofencing for given regions. When the new event comes, the task with specified name will\n * be called with the region that the device enter to or exit from.\n * If you want to add or remove regions from already running geofencing task, you can just call\n * `startGeofencingAsync` again with the new array of regions.\n *\n * # Task parameters\n *\n * Geofencing task will be receiving following data:\n * - `eventType` - Indicates the reason for calling the task, which can be triggered by entering or exiting the region.\n * See [`GeofencingEventType`](#geofencingeventtype).\n * - `region` - Object containing details about updated region. See [`LocationRegion`](#locationregion) for more details.\n *\n * @param taskName Name of the task that will be called when the device enters or exits from specified regions.\n * @param regions Array of region objects to be geofenced.\n *\n * @return A promise resolving as soon as the task is registered.\n *\n * @example\n * ```ts\n * import { GeofencingEventType } from 'expo-location';\n * import * as TaskManager from 'expo-task-manager';\n *\n * TaskManager.defineTask(YOUR_TASK_NAME, ({ data: { eventType, region }, error }) => {\n * if (error) {\n * // check `error.message` for more details.\n * return;\n * }\n * if (eventType === GeofencingEventType.Enter) {\n * console.log(\"You've entered region:\", region);\n * } else if (eventType === GeofencingEventType.Exit) {\n * console.log(\"You've left region:\", region);\n * }\n * });\n * ```\n */\nexport async function startGeofencingAsync(\n taskName: string,\n regions: LocationRegion[] = []\n): Promise<void> {\n _validate(taskName);\n _validateRegions(regions);\n await ExpoLocation.startGeofencingAsync(taskName, { regions });\n}\n\n// @needsAudit\n/**\n * Stops geofencing for specified task. It unregisters the background task so the app will not be\n * receiving any updates, especially in the background.\n * @param taskName Name of the task to unregister.\n * @return A promise resolving as soon as the task is unregistered.\n */\nexport async function stopGeofencingAsync(taskName: string): Promise<void> {\n _validate(taskName);\n await ExpoLocation.stopGeofencingAsync(taskName);\n}\n\n// @needsAudit\n/**\n * @param taskName Name of the geofencing task to check.\n * @return A promise which fulfills with boolean value indicating whether the geofencing task is\n * started or not.\n */\nexport async function hasStartedGeofencingAsync(taskName: string): Promise<boolean> {\n _validate(taskName);\n return ExpoLocation.hasStartedGeofencingAsync(taskName);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Location.types.d.ts","sourceRoot":"","sources":["../src/Location.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Location.types.d.ts","sourceRoot":"","sources":["../src/Location.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAG/C;;GAEG;AACH,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,GAAG,IAAI;IACP;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,iBAAiB,IAAI;CACtB;AAGD;;GAEG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,KAAK,IAAI;IACT;;;OAGG;IACH,oBAAoB,IAAI;IACxB;;;OAGG;IACH,OAAO,IAAI;IACX;;;OAGG;IACH,eAAe,IAAI;IACnB;;;;OAIG;IACH,QAAQ,IAAI;CACb;AAGD;;GAEG;AACH,oBAAY,2BAA2B;IACrC;;OAEG;IACH,KAAK,IAAI;IACT;;OAEG;IACH,IAAI,IAAI;CACT;AAGD;;GAEG;AACH,oBAAY,6BAA6B;IACvC;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,OAAO,IAAI;CACZ;A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B,CAAA;IACxB;;;OAGG;IACH,qEAAW,CAAA;IACX;;;OAGG;IACH,qFAAmB,CAAA;IACnB;;;;OAIG;IACH,uEAAY,CAAA;AACd,CAAC,EA1BW,oBAAoB,KAApB,oBAAoB,QA0B/B;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,2BASX;AATD,WAAY,2BAA2B;IACrC;;OAEG;IACH,+EAAS,CAAA;IACT;;OAEG;IACH,6EAAQ,CAAA;AACV,CAAC,EATW,2BAA2B,KAA3B,2BAA2B,QAStC;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,6BAaX;AAbD,WAAY,6BAA6B;IACvC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,qFAAU,CAAA;IACV;;OAEG;IACH,uFAAW,CAAA;AACb,CAAC,EAbW,6BAA6B,KAA7B,6BAA6B,QAaxC","sourcesContent":["import type { PermissionResponse } from 'expo-modules-core';\n\n// @needsAudit\n/**\n * Enum with available location accuracies.\n */\nexport enum LocationAccuracy {\n /**\n * Accurate to the nearest three kilometers.\n */\n Lowest = 1,\n /**\n * Accurate to the nearest kilometer.\n */\n Low = 2,\n /**\n * Accurate to within one hundred meters.\n */\n Balanced = 3,\n /**\n * Accurate to within ten meters of the desired target.\n */\n High = 4,\n /**\n * The best level of accuracy available.\n */\n Highest = 5,\n /**\n * The highest possible accuracy that uses additional sensor data to facilitate navigation apps.\n */\n BestForNavigation = 6,\n}\n\n// @needsAudit\n/**\n * Enum with available activity types of background location tracking.\n */\nexport enum LocationActivityType {\n /**\n * Default activity type. Use it if there is no other type that matches the activity you track.\n */\n Other = 1,\n /**\n * Location updates are being used specifically during vehicular navigation to track location\n * changes to the automobile.\n */\n AutomotiveNavigation = 2,\n /**\n * Use this activity type if you track fitness activities such as walking, running, cycling,\n * and so on.\n */\n Fitness = 3,\n /**\n * Activity type for movements for other types of vehicular navigation that are not automobile\n * related.\n */\n OtherNavigation = 4,\n /**\n * Intended for airborne activities. Fall backs to `ActivityType.Other` if\n * unsupported.\n * @platform ios\n */\n Airborne = 5,\n}\n\n// @needsAudit\n/**\n * A type of the event that geofencing task can receive.\n */\nexport enum LocationGeofencingEventType {\n /**\n * Emitted when the device entered observed region.\n */\n Enter = 1,\n /**\n * Occurs as soon as the device left observed region\n */\n Exit = 2,\n}\n\n// @needsAudit\n/**\n * State of the geofencing region that you receive through the geofencing task.\n */\nexport enum LocationGeofencingRegionState {\n /**\n * Indicates that the device position related to the region is unknown.\n */\n Unknown = 0,\n /**\n * Indicates that the device is inside the region.\n */\n Inside = 1,\n /**\n * Inverse of inside state.\n */\n Outside = 2,\n}\n\n// @needsAudit\n/**\n * Type representing options argument in `getCurrentPositionAsync`.\n */\nexport type LocationOptions = {\n /**\n * Location manager accuracy. Pass one of `Accuracy` enum values.\n * For low-accuracies the implementation can avoid geolocation providers\n * that consume a significant amount of power (such as GPS).\n *\n * @default LocationAccuracy.Balanced\n */\n accuracy?: LocationAccuracy;\n /**\n * Specifies whether to ask the user to turn on improved accuracy location mode\n * which uses Wi-Fi, cell networks and GPS sensor.\n * @default true\n * @platform android\n */\n mayShowUserSettingsDialog?: boolean;\n /**\n * Minimum time to wait between each update in milliseconds.\n * Default value may depend on `accuracy` option.\n * @platform android\n */\n timeInterval?: number;\n /**\n * Receive updates only when the location has changed by at least this distance in meters.\n * Default value may depend on `accuracy` option.\n */\n distanceInterval?: number;\n};\n\n// @needsAudit\n/**\n * Type representing options object that can be passed to `getLastKnownPositionAsync`.\n */\nexport type LocationLastKnownOptions = {\n /**\n * A number of milliseconds after which the last known location starts to be invalid and thus\n * `null` is returned.\n */\n maxAge?: number;\n /**\n * The maximum radius of uncertainty for the location, measured in meters. If the last known\n * location's accuracy radius is bigger (less accurate) then `null` is returned.\n */\n requiredAccuracy?: number;\n};\n\n// @needsAudit\n/**\n * Type representing background location task options.\n */\nexport type LocationTaskOptions = LocationOptions & {\n /**\n * A boolean indicating whether the status bar changes its appearance when\n * location services are used in the background.\n * @default false\n * @platform ios\n */\n showsBackgroundLocationIndicator?: boolean;\n /**\n * The distance in meters that must occur between last reported location and the current location\n * before deferred locations are reported.\n * @default 0\n */\n deferredUpdatesDistance?: number;\n // @docsMissing\n deferredUpdatesTimeout?: number;\n /**\n * Minimum time interval in milliseconds that must pass since last reported location before all\n * later locations are reported in a batched update\n * @default 0\n */\n deferredUpdatesInterval?: number;\n /**\n * The type of user activity associated with the location updates.\n * @see See [Apple docs](https://developer.apple.com/documentation/corelocation/cllocationmanager/1620567-activitytype) for more details.\n * @default ActivityType.Other\n * @platform ios\n */\n activityType?: LocationActivityType;\n /**\n * A boolean value indicating whether the location manager can pause location\n * updates to improve battery life without sacrificing location data. When this option is set to\n * `true`, the location manager pauses updates (and powers down the appropriate hardware) at times\n * when the location data is unlikely to change. You can help the determination of when to pause\n * location updates by assigning a value to the `activityType` property.\n * @default false\n * @platform ios\n */\n pausesUpdatesAutomatically?: boolean;\n foregroundService?: LocationTaskServiceOptions;\n};\n\n// @needsAudit\nexport type LocationTaskServiceOptions = {\n /**\n * Title of the foreground service notification.\n */\n notificationTitle: string;\n /**\n * Subtitle of the foreground service notification.\n */\n notificationBody: string;\n /**\n * Color of the foreground service notification. Accepts `#RRGGBB` and `#AARRGGBB` hex formats.\n */\n notificationColor?: string;\n /**\n * Boolean value whether to destroy the foreground service if the app is killed.\n */\n killServiceOnDestroy?: boolean;\n};\n\n// @needsAudit\n/**\n * Type representing geofencing region object.\n */\nexport type LocationRegion = {\n /**\n * The identifier of the region object. Defaults to auto-generated UUID hash.\n */\n identifier?: string;\n /**\n * The latitude in degrees of region's center point.\n */\n latitude: number;\n /**\n * The longitude in degrees of region's center point.\n */\n longitude: number;\n /**\n * The radius measured in meters that defines the region's outer boundary.\n */\n radius: number;\n /**\n * Boolean value whether to call the task if the device enters the region.\n * @default true\n */\n notifyOnEnter?: boolean;\n /**\n * Boolean value whether to call the task if the device exits the region.\n * @default true\n */\n notifyOnExit?: boolean;\n /**\n * One of [GeofencingRegionState](#geofencingregionstate) region state. Determines whether the\n * device is inside or outside a region.\n */\n state?: LocationGeofencingRegionState;\n};\n\n// @needsAudit\n/**\n * Type representing the location object.\n */\nexport type LocationObject = {\n /**\n * The coordinates of the position.\n */\n coords: LocationObjectCoords;\n /**\n * The time at which this position information was obtained, in milliseconds since epoch.\n */\n timestamp: number;\n /**\n * Whether the location coordinates is mocked or not.\n * @platform android\n */\n mocked?: boolean;\n};\n\n// @needsAudit\n/**\n * Type representing the location GPS related data.\n */\nexport type LocationObjectCoords = {\n /**\n * The latitude in degrees.\n */\n latitude: number;\n /**\n * The longitude in degrees.\n */\n longitude: number;\n /**\n * The altitude in meters above the WGS 84 reference ellipsoid. Can be `null` on Web if it's not available.\n */\n altitude: number | null;\n /**\n * The radius of uncertainty for the location, measured in meters. Can be `null` on Web if it's not available.\n */\n accuracy: number | null;\n /**\n * The accuracy of the altitude value, in meters. Can be `null` on Web if it's not available.\n */\n altitudeAccuracy: number | null;\n /**\n * Horizontal direction of travel of this device, measured in degrees starting at due north and\n * continuing clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is\n * 180 degrees, and so on. Can be `null` on Web if it's not available.\n */\n heading: number | null;\n /**\n * The instantaneous speed of the device in meters per second. Can be `null` on Web if it's not available.\n */\n speed: number | null;\n};\n\n// @needsAudit\n/**\n * Represents `watchPositionAsync` callback.\n */\nexport type LocationCallback = (location: LocationObject) => any;\n\n/**\n * Error callback for location methods.\n */\nexport type LocationErrorCallback = (reason: string) => void;\n\n// @needsAudit\n/**\n * Represents the object containing details about location provider.\n */\nexport type LocationProviderStatus = {\n /**\n * Whether location services are enabled. See [Location.hasServicesEnabledAsync](#locationhasservicesenabledasync)\n * for a more convenient solution to get this value.\n */\n locationServicesEnabled: boolean;\n // @docsMissing\n backgroundModeEnabled: boolean;\n /**\n * Whether the GPS provider is available. If `true` the location data will come\n * from GPS, especially for requests with high accuracy.\n * @platform android\n */\n gpsAvailable?: boolean;\n /**\n * Whether the network provider is available. If `true` the location data will\n * come from cellular network, especially for requests with low accuracy.\n * @platform android\n */\n networkAvailable?: boolean;\n /**\n * Whether the passive provider is available. If `true` the location data will\n * be determined passively.\n * @platform android\n */\n passiveAvailable?: boolean;\n};\n\n// @needsAudit\n/**\n * Type of the object containing heading details and provided by `watchHeadingAsync` callback.\n */\nexport type LocationHeadingObject = {\n /**\n * Measure of true north in degrees (needs location permissions, will return `-1` if not given).\n */\n trueHeading: number;\n /**\n * Measure of magnetic north in degrees.\n */\n magHeading: number;\n /**\n * Level of calibration of compass:\n * - `3`: high accuracy\n * - `2`: medium accuracy\n * - `1`: low accuracy\n * - `0`: none\n *\n * Reference for iOS:\n * - `3`: < 20 degrees uncertainty\n * - `2`: < 35 degrees\n * - `1`: < 50 degrees\n * - `0`: > 50 degrees\n */\n accuracy: number;\n};\n\n// @needsAudit\n/**\n * Represents `watchHeadingAsync` callback.\n */\nexport type LocationHeadingCallback = (location: LocationHeadingObject) => any;\n\n// @needsAudit\n/**\n * Type representing a result of `geocodeAsync`.\n */\nexport type LocationGeocodedLocation = {\n /**\n * The latitude in degrees.\n */\n latitude: number;\n /**\n * The longitude in degrees.\n */\n longitude: number;\n /**\n * The altitude in meters above the WGS 84 reference ellipsoid.\n */\n altitude?: number;\n /**\n * The radius of uncertainty for the location, measured in meters.\n */\n accuracy?: number;\n};\n\n// @needsAudit\n/**\n * Type representing a result of `reverseGeocodeAsync`.\n */\nexport type LocationGeocodedAddress = {\n /**\n * City name of the address.\n */\n city: string | null;\n /**\n * Additional city-level information like district name.\n */\n district: string | null;\n /**\n * Street number of the address.\n */\n streetNumber: string | null;\n /**\n * Street name of the address.\n */\n street: string | null;\n /**\n * The state or province associated with the address.\n */\n region: string | null;\n /**\n * Additional information about administrative area.\n */\n subregion: string | null;\n /**\n * Localized country name of the address.\n */\n country: string | null;\n /**\n * Postal code of the address.\n */\n postalCode: string | null;\n /**\n * The name of the placemark, for example, \"Tower Bridge\".\n */\n name: string | null;\n /**\n * Localized (ISO) country code of the address, if available.\n */\n isoCountryCode: string | null;\n /**\n * The timezone identifier associated with the address.\n * @platform ios\n */\n timezone: string | null;\n /**\n * Composed string of the address components, for example, \"111 8th Avenue, New York, NY\".\n * @platform android\n */\n formattedAddress: string | null;\n};\n\n// @needsAudit\n/**\n * Represents subscription object returned by methods watching for new locations or headings.\n */\nexport type LocationSubscription = {\n /**\n * Call this function with no arguments to remove this subscription. The callback will no longer\n * be called for location updates.\n */\n remove: () => void;\n};\n\n// @needsAudit\nexport type PermissionDetailsLocationIOS = {\n /**\n * The scope of granted permission. Indicates when it's possible to use location.\n */\n scope: 'whenInUse' | 'always' | 'none';\n /**\n * The accuracy authorization granted by the user.\n * `'full'` means the user has granted precise location access, `'reduced'` means the app\n * can only access approximate location. Below iOS 14 always returns `'full'`.\n * @platform ios 14+\n */\n accuracy: 'full' | 'reduced';\n};\n\n// @needsAudit\nexport type PermissionDetailsLocationAndroid = {\n /**\n * Indicates the type of location provider.\n */\n accuracy: 'fine' | 'coarse' | 'none';\n};\n\n// @needsAudit\n/**\n * `LocationPermissionResponse` extends [`PermissionResponse`](#permissionresponse)\n * type exported by `expo-modules-core` and contains additional platform-specific fields.\n */\nexport type LocationPermissionResponse = PermissionResponse & {\n ios?: PermissionDetailsLocationIOS;\n android?: PermissionDetailsLocationAndroid;\n};\n\nexport type { PermissionResponse };\n"]}
|
|
1
|
+
{"version":3,"file":"Location.types.js","sourceRoot":"","sources":["../src/Location.types.ts"],"names":[],"mappings":"AAEA,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,2DAAU,CAAA;IACV;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,+DAAY,CAAA;IACZ;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,6DAAW,CAAA;IACX;;OAEG;IACH,iFAAqB,CAAA;AACvB,CAAC,EAzBW,gBAAgB,KAAhB,gBAAgB,QAyB3B;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,oBA0BX;AA1BD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,iEAAS,CAAA;IACT;;;OAGG;IACH,+FAAwB,CAAA;IACxB;;;OAGG;IACH,qEAAW,CAAA;IACX;;;OAGG;IACH,qFAAmB,CAAA;IACnB;;;;OAIG;IACH,uEAAY,CAAA;AACd,CAAC,EA1BW,oBAAoB,KAApB,oBAAoB,QA0B/B;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,2BASX;AATD,WAAY,2BAA2B;IACrC;;OAEG;IACH,+EAAS,CAAA;IACT;;OAEG;IACH,6EAAQ,CAAA;AACV,CAAC,EATW,2BAA2B,KAA3B,2BAA2B,QAStC;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,6BAaX;AAbD,WAAY,6BAA6B;IACvC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,qFAAU,CAAA;IACV;;OAEG;IACH,uFAAW,CAAA;AACb,CAAC,EAbW,6BAA6B,KAA7B,6BAA6B,QAaxC","sourcesContent":["import type { PermissionResponse } from 'expo';\n\n// @needsAudit\n/**\n * Enum with available location accuracies.\n */\nexport enum LocationAccuracy {\n /**\n * Accurate to the nearest three kilometers.\n */\n Lowest = 1,\n /**\n * Accurate to the nearest kilometer.\n */\n Low = 2,\n /**\n * Accurate to within one hundred meters.\n */\n Balanced = 3,\n /**\n * Accurate to within ten meters of the desired target.\n */\n High = 4,\n /**\n * The best level of accuracy available.\n */\n Highest = 5,\n /**\n * The highest possible accuracy that uses additional sensor data to facilitate navigation apps.\n */\n BestForNavigation = 6,\n}\n\n// @needsAudit\n/**\n * Enum with available activity types of background location tracking.\n */\nexport enum LocationActivityType {\n /**\n * Default activity type. Use it if there is no other type that matches the activity you track.\n */\n Other = 1,\n /**\n * Location updates are being used specifically during vehicular navigation to track location\n * changes to the automobile.\n */\n AutomotiveNavigation = 2,\n /**\n * Use this activity type if you track fitness activities such as walking, running, cycling,\n * and so on.\n */\n Fitness = 3,\n /**\n * Activity type for movements for other types of vehicular navigation that are not automobile\n * related.\n */\n OtherNavigation = 4,\n /**\n * Intended for airborne activities. Fall backs to `ActivityType.Other` if\n * unsupported.\n * @platform ios\n */\n Airborne = 5,\n}\n\n// @needsAudit\n/**\n * A type of the event that geofencing task can receive.\n */\nexport enum LocationGeofencingEventType {\n /**\n * Emitted when the device entered observed region.\n */\n Enter = 1,\n /**\n * Occurs as soon as the device left observed region\n */\n Exit = 2,\n}\n\n// @needsAudit\n/**\n * State of the geofencing region that you receive through the geofencing task.\n */\nexport enum LocationGeofencingRegionState {\n /**\n * Indicates that the device position related to the region is unknown.\n */\n Unknown = 0,\n /**\n * Indicates that the device is inside the region.\n */\n Inside = 1,\n /**\n * Inverse of inside state.\n */\n Outside = 2,\n}\n\n// @needsAudit\n/**\n * Type representing options argument in `getCurrentPositionAsync`.\n */\nexport type LocationOptions = {\n /**\n * Location manager accuracy. Pass one of `Accuracy` enum values.\n * For low-accuracies the implementation can avoid geolocation providers\n * that consume a significant amount of power (such as GPS).\n *\n * @default LocationAccuracy.Balanced\n */\n accuracy?: LocationAccuracy;\n /**\n * Specifies whether to ask the user to turn on improved accuracy location mode\n * which uses Wi-Fi, cell networks and GPS sensor.\n * @default true\n * @platform android\n */\n mayShowUserSettingsDialog?: boolean;\n /**\n * Minimum time to wait between each update in milliseconds.\n * Default value may depend on `accuracy` option.\n * @platform android\n */\n timeInterval?: number;\n /**\n * Receive updates only when the location has changed by at least this distance in meters.\n * Default value may depend on `accuracy` option.\n */\n distanceInterval?: number;\n};\n\n// @needsAudit\n/**\n * Type representing options object that can be passed to `getLastKnownPositionAsync`.\n */\nexport type LocationLastKnownOptions = {\n /**\n * A number of milliseconds after which the last known location starts to be invalid and thus\n * `null` is returned.\n */\n maxAge?: number;\n /**\n * The maximum radius of uncertainty for the location, measured in meters. If the last known\n * location's accuracy radius is bigger (less accurate) then `null` is returned.\n */\n requiredAccuracy?: number;\n};\n\n// @needsAudit\n/**\n * Type representing background location task options.\n */\nexport type LocationTaskOptions = LocationOptions & {\n /**\n * A boolean indicating whether the status bar changes its appearance when\n * location services are used in the background.\n * @default false\n * @platform ios\n */\n showsBackgroundLocationIndicator?: boolean;\n /**\n * The distance in meters that must occur between last reported location and the current location\n * before deferred locations are reported.\n * @default 0\n */\n deferredUpdatesDistance?: number;\n // @docsMissing\n deferredUpdatesTimeout?: number;\n /**\n * Minimum time interval in milliseconds that must pass since last reported location before all\n * later locations are reported in a batched update\n * @default 0\n */\n deferredUpdatesInterval?: number;\n /**\n * The type of user activity associated with the location updates.\n * @see See [Apple docs](https://developer.apple.com/documentation/corelocation/cllocationmanager/1620567-activitytype) for more details.\n * @default ActivityType.Other\n * @platform ios\n */\n activityType?: LocationActivityType;\n /**\n * A boolean value indicating whether the location manager can pause location\n * updates to improve battery life without sacrificing location data. When this option is set to\n * `true`, the location manager pauses updates (and powers down the appropriate hardware) at times\n * when the location data is unlikely to change. You can help the determination of when to pause\n * location updates by assigning a value to the `activityType` property.\n * @default false\n * @platform ios\n */\n pausesUpdatesAutomatically?: boolean;\n foregroundService?: LocationTaskServiceOptions;\n};\n\n// @needsAudit\nexport type LocationTaskServiceOptions = {\n /**\n * Title of the foreground service notification.\n */\n notificationTitle: string;\n /**\n * Subtitle of the foreground service notification.\n */\n notificationBody: string;\n /**\n * Color of the foreground service notification. Accepts `#RRGGBB` and `#AARRGGBB` hex formats.\n */\n notificationColor?: string;\n /**\n * Boolean value whether to destroy the foreground service if the app is killed.\n */\n killServiceOnDestroy?: boolean;\n};\n\n// @needsAudit\n/**\n * Type representing geofencing region object.\n */\nexport type LocationRegion = {\n /**\n * The identifier of the region object. Defaults to auto-generated UUID hash.\n */\n identifier?: string;\n /**\n * The latitude in degrees of region's center point.\n */\n latitude: number;\n /**\n * The longitude in degrees of region's center point.\n */\n longitude: number;\n /**\n * The radius measured in meters that defines the region's outer boundary.\n */\n radius: number;\n /**\n * Boolean value whether to call the task if the device enters the region.\n * @default true\n */\n notifyOnEnter?: boolean;\n /**\n * Boolean value whether to call the task if the device exits the region.\n * @default true\n */\n notifyOnExit?: boolean;\n /**\n * One of [GeofencingRegionState](#geofencingregionstate) region state. Determines whether the\n * device is inside or outside a region.\n */\n state?: LocationGeofencingRegionState;\n};\n\n// @needsAudit\n/**\n * Type representing the location object.\n */\nexport type LocationObject = {\n /**\n * The coordinates of the position.\n */\n coords: LocationObjectCoords;\n /**\n * The time at which this position information was obtained, in milliseconds since epoch.\n */\n timestamp: number;\n /**\n * Whether the location coordinates is mocked or not.\n * @platform android\n */\n mocked?: boolean;\n};\n\n// @needsAudit\n/**\n * Type representing the location GPS related data.\n */\nexport type LocationObjectCoords = {\n /**\n * The latitude in degrees.\n */\n latitude: number;\n /**\n * The longitude in degrees.\n */\n longitude: number;\n /**\n * The altitude in meters above the WGS 84 reference ellipsoid. Can be `null` on Web if it's not available.\n */\n altitude: number | null;\n /**\n * The radius of uncertainty for the location, measured in meters. Can be `null` on Web if it's not available.\n */\n accuracy: number | null;\n /**\n * The accuracy of the altitude value, in meters. Can be `null` on Web if it's not available.\n */\n altitudeAccuracy: number | null;\n /**\n * Horizontal direction of travel of this device, measured in degrees starting at due north and\n * continuing clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is\n * 180 degrees, and so on. Can be `null` on Web if it's not available.\n */\n heading: number | null;\n /**\n * The instantaneous speed of the device in meters per second. Can be `null` on Web if it's not available.\n */\n speed: number | null;\n};\n\n// @needsAudit\n/**\n * Represents `watchPositionAsync` callback.\n */\nexport type LocationCallback = (location: LocationObject) => any;\n\n/**\n * Error callback for location methods.\n */\nexport type LocationErrorCallback = (reason: string) => void;\n\n// @needsAudit\n/**\n * Represents the object containing details about location provider.\n */\nexport type LocationProviderStatus = {\n /**\n * Whether location services are enabled. See [Location.hasServicesEnabledAsync](#locationhasservicesenabledasync)\n * for a more convenient solution to get this value.\n */\n locationServicesEnabled: boolean;\n // @docsMissing\n backgroundModeEnabled: boolean;\n /**\n * Whether the GPS provider is available. If `true` the location data will come\n * from GPS, especially for requests with high accuracy.\n * @platform android\n */\n gpsAvailable?: boolean;\n /**\n * Whether the network provider is available. If `true` the location data will\n * come from cellular network, especially for requests with low accuracy.\n * @platform android\n */\n networkAvailable?: boolean;\n /**\n * Whether the passive provider is available. If `true` the location data will\n * be determined passively.\n * @platform android\n */\n passiveAvailable?: boolean;\n};\n\n// @needsAudit\n/**\n * Type of the object containing heading details and provided by `watchHeadingAsync` callback.\n */\nexport type LocationHeadingObject = {\n /**\n * Measure of true north in degrees (needs location permissions, will return `-1` if not given).\n */\n trueHeading: number;\n /**\n * Measure of magnetic north in degrees.\n */\n magHeading: number;\n /**\n * Level of calibration of compass:\n * - `3`: high accuracy\n * - `2`: medium accuracy\n * - `1`: low accuracy\n * - `0`: none\n *\n * Reference for iOS:\n * - `3`: < 20 degrees uncertainty\n * - `2`: < 35 degrees\n * - `1`: < 50 degrees\n * - `0`: > 50 degrees\n */\n accuracy: number;\n};\n\n// @needsAudit\n/**\n * Represents `watchHeadingAsync` callback.\n */\nexport type LocationHeadingCallback = (location: LocationHeadingObject) => any;\n\n// @needsAudit\n/**\n * Type representing a result of `geocodeAsync`.\n */\nexport type LocationGeocodedLocation = {\n /**\n * The latitude in degrees.\n */\n latitude: number;\n /**\n * The longitude in degrees.\n */\n longitude: number;\n /**\n * The altitude in meters above the WGS 84 reference ellipsoid.\n */\n altitude?: number;\n /**\n * The radius of uncertainty for the location, measured in meters.\n */\n accuracy?: number;\n};\n\n// @needsAudit\n/**\n * Type representing a result of `reverseGeocodeAsync`.\n */\nexport type LocationGeocodedAddress = {\n /**\n * City name of the address.\n */\n city: string | null;\n /**\n * Additional city-level information like district name.\n */\n district: string | null;\n /**\n * Street number of the address.\n */\n streetNumber: string | null;\n /**\n * Street name of the address.\n */\n street: string | null;\n /**\n * The state or province associated with the address.\n */\n region: string | null;\n /**\n * Additional information about administrative area.\n */\n subregion: string | null;\n /**\n * Localized country name of the address.\n */\n country: string | null;\n /**\n * Postal code of the address.\n */\n postalCode: string | null;\n /**\n * The name of the placemark, for example, \"Tower Bridge\".\n */\n name: string | null;\n /**\n * Localized (ISO) country code of the address, if available.\n */\n isoCountryCode: string | null;\n /**\n * The timezone identifier associated with the address.\n * @platform ios\n */\n timezone: string | null;\n /**\n * Composed string of the address components, for example, \"111 8th Avenue, New York, NY\".\n * @platform android\n */\n formattedAddress: string | null;\n};\n\n// @needsAudit\n/**\n * Represents subscription object returned by methods watching for new locations or headings.\n */\nexport type LocationSubscription = {\n /**\n * Call this function with no arguments to remove this subscription. The callback will no longer\n * be called for location updates.\n */\n remove: () => void;\n};\n\n// @needsAudit\nexport type PermissionDetailsLocationIOS = {\n /**\n * The scope of granted permission. Indicates when it's possible to use location.\n */\n scope: 'whenInUse' | 'always' | 'none';\n /**\n * The accuracy authorization granted by the user.\n * `'full'` means the user has granted precise location access, `'reduced'` means the app\n * can only access approximate location. Below iOS 14 always returns `'full'`.\n * @platform ios 14+\n */\n accuracy: 'full' | 'reduced';\n};\n\n// @needsAudit\nexport type PermissionDetailsLocationAndroid = {\n /**\n * Indicates the type of location provider.\n */\n accuracy: 'fine' | 'coarse' | 'none';\n};\n\n// @needsAudit\n/**\n * `LocationPermissionResponse` extends [`PermissionResponse`](#permissionresponse)\n * type exported by `expo-modules-core` and contains additional platform-specific fields.\n */\nexport type LocationPermissionResponse = PermissionResponse & {\n ios?: PermissionDetailsLocationIOS;\n android?: PermissionDetailsLocationAndroid;\n};\n\nexport type { PermissionResponse };\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PermissionStatus, type PermissionHookOptions, type PermissionExpiration
|
|
1
|
+
export { PermissionStatus, type PermissionHookOptions, type PermissionExpiration } from 'expo';
|
|
2
2
|
export { LocationEventEmitter as EventEmitter } from './LocationEventEmitter';
|
|
3
3
|
export { _getCurrentWatchId } from './LocationSubscribers';
|
|
4
4
|
export { installWebGeolocationPolyfill } from './GeolocationPolyfill';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,MAAM,CAAC;AAE/F,OAAO,EAAE,oBAAoB,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EACL,gBAAgB,IAAI,QAAQ,EAC5B,oBAAoB,IAAI,YAAY,EACpC,2BAA2B,IAAI,mBAAmB,EAClD,6BAA6B,IAAI,qBAAqB,GACvD,MAAM,kBAAkB,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PermissionStatus
|
|
1
|
+
export { PermissionStatus } from 'expo';
|
|
2
2
|
export { LocationEventEmitter as EventEmitter } from './LocationEventEmitter';
|
|
3
3
|
export { _getCurrentWatchId } from './LocationSubscribers';
|
|
4
4
|
export { installWebGeolocationPolyfill } from './GeolocationPolyfill';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAyD,MAAM,MAAM,CAAC;AAE/F,OAAO,EAAE,oBAAoB,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EACL,gBAAgB,IAAI,QAAQ,EAC5B,oBAAoB,IAAI,YAAY,EACpC,2BAA2B,IAAI,mBAAmB,EAClD,6BAA6B,IAAI,qBAAqB,GACvD,MAAM,kBAAkB,CAAC","sourcesContent":["export { PermissionStatus, type PermissionHookOptions, type PermissionExpiration } from 'expo';\n\nexport { LocationEventEmitter as EventEmitter } from './LocationEventEmitter';\nexport { _getCurrentWatchId } from './LocationSubscribers';\nexport { installWebGeolocationPolyfill } from './GeolocationPolyfill';\n\nexport * from './Location';\nexport * from './Location.types';\n\nexport {\n LocationAccuracy as Accuracy,\n LocationActivityType as ActivityType,\n LocationGeofencingEventType as GeofencingEventType,\n LocationGeofencingRegionState as GeofencingRegionState,\n} from './Location.types';\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.location",
|
|
6
|
-
"version": "56.0.
|
|
6
|
+
"version": "56.0.7",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"files": [
|
|
35
35
|
{
|
|
36
|
-
"name": "expo.modules.location-56.0.
|
|
37
|
-
"url": "expo.modules.location-56.0.
|
|
36
|
+
"name": "expo.modules.location-56.0.7.aar",
|
|
37
|
+
"url": "expo.modules.location-56.0.7.aar",
|
|
38
38
|
"size": 220734,
|
|
39
39
|
"sha512": "f27ba01ac26c5302898aafdf8e127bba39b9b884bc847aadb2a8d0b3047b0c9e0a35c9cf2df8629927c7bed437f1694c9a61830b04e6cbc3078c8c1d92aea85d",
|
|
40
40
|
"sha256": "91f7ca94c19cddc81ad87df23e60e546066fa33fea7790cb782a2bf98d7e2a86",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
],
|
|
84
84
|
"files": [
|
|
85
85
|
{
|
|
86
|
-
"name": "expo.modules.location-56.0.
|
|
87
|
-
"url": "expo.modules.location-56.0.
|
|
86
|
+
"name": "expo.modules.location-56.0.7.aar",
|
|
87
|
+
"url": "expo.modules.location-56.0.7.aar",
|
|
88
88
|
"size": 220734,
|
|
89
89
|
"sha512": "f27ba01ac26c5302898aafdf8e127bba39b9b884bc847aadb2a8d0b3047b0c9e0a35c9cf2df8629927c7bed437f1694c9a61830b04e6cbc3078c8c1d92aea85d",
|
|
90
90
|
"sha256": "91f7ca94c19cddc81ad87df23e60e546066fa33fea7790cb782a2bf98d7e2a86",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
},
|
|
104
104
|
"files": [
|
|
105
105
|
{
|
|
106
|
-
"name": "expo.modules.location-56.0.
|
|
107
|
-
"url": "expo.modules.location-56.0.
|
|
106
|
+
"name": "expo.modules.location-56.0.7-sources.jar",
|
|
107
|
+
"url": "expo.modules.location-56.0.7-sources.jar",
|
|
108
108
|
"size": 23688,
|
|
109
109
|
"sha512": "c82ff673c2f8c20ab72fe604588e15dc84bc18b48788d5833a0e3393b307d331ada240823b4c3cd162130bdc8c887538970986885612dfba08614e5f6647576a",
|
|
110
110
|
"sha256": "72957595eb7adf5629c2e524ea6b6e3baf53ddcf7b7deb40c3c87cb02bbab905",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
840d4d9ad9e7ec4340ecec0b3abbef07
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e63396e6eb85969f4f89ea55d95c6cf45ece638d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5a4b231256df686273fa2554f49e0709aef54e67817034af09a2f6d0b2adc657
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f627e7588b7ed247d2f041d12706b8bcc1929fb6edd3025bf94ca50ef5de3731d8ad97b8cfefdedec3aea7ae2ee93b8193199312bac50ec0618845ed52f0574c
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.location</artifactId>
|
|
12
|
-
<version>56.0.
|
|
12
|
+
<version>56.0.7</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.location</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fd0d4d384e6bb9e300f973ab9cdeb6a6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8680b590c7007517418e52797a35f24e9f8a25e6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
284b5fe862121b9c8d90d334bfda5aa95c01a6d41ece9e461f96318cc323f227
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e00f33012aedc894504b1b975abbee4edda6fd098c441f2a768498e3fffa5cda0e63bd84addc601bae1799115c76d50022aeb96e96bffb019aa60ce60e733645
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.location</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.0.
|
|
7
|
-
<release>56.0.
|
|
6
|
+
<latest>56.0.7</latest>
|
|
7
|
+
<release>56.0.7</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.0.
|
|
9
|
+
<version>56.0.7</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260513103320</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
92d4ce9327623723e66c402bb177657d
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2dbd522405a91dd2442df5b1469002f07ae925f5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
21f132912121a585cbd4d6961de61cffc64c9ed4a021492ef9666e74e1e993f1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3c744b5d45072e5ab699b0c041fa1693b31774740242fdd0910af2d41d260c0533ee4646a2f7c01604d40150a0a29042d95069cc6427c79ddb14bf47f22cbdbe
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-location",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.7",
|
|
4
4
|
"description": "Allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^22.14.0",
|
|
37
|
-
"expo": "56.0.0-preview.
|
|
37
|
+
"expo": "56.0.0-preview.10",
|
|
38
38
|
"expo-module-scripts": "56.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"expo": "*"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "40f0a6f6711d93762e0506b37e6e077e4bd9a541",
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "expo-module build",
|
|
46
46
|
"clean": "expo-module clean",
|
|
Binary file
|
|
Binary file
|
package/src/ExpoLocation.web.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
1
|
+
import { type PermissionResponse, PermissionStatus } from 'expo';
|
|
2
|
+
import { UnavailabilityError } from 'expo-modules-core';
|
|
3
3
|
|
|
4
4
|
import type { LocationLastKnownOptions, LocationObject, LocationOptions } from './Location.types';
|
|
5
5
|
import { LocationAccuracy } from './Location.types';
|
package/src/Location.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { isRunningInExpoGo } from 'expo';
|
|
2
|
-
import
|
|
3
|
-
import { createPermissionHook, Platform } from 'expo-modules-core';
|
|
1
|
+
import { createPermissionHook, isRunningInExpoGo, type PermissionResponse } from 'expo';
|
|
2
|
+
import { Platform } from 'expo-modules-core';
|
|
4
3
|
|
|
5
4
|
import ExpoLocation from './ExpoLocation';
|
|
6
5
|
import type {
|
package/src/Location.types.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
PermissionStatus,
|
|
3
|
-
type PermissionHookOptions,
|
|
4
|
-
type PermissionExpiration,
|
|
5
|
-
} from 'expo-modules-core';
|
|
1
|
+
export { PermissionStatus, type PermissionHookOptions, type PermissionExpiration } from 'expo';
|
|
6
2
|
|
|
7
3
|
export { LocationEventEmitter as EventEmitter } from './LocationEventEmitter';
|
|
8
4
|
export { _getCurrentWatchId } from './LocationSubscribers';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4d1f3ad48a1c73581026c3a227a10a2b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8ed82cbfb7af242c6b3dbc3274bd6cc4ef8912e1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7a1272dff0803f6c120fe353700c26009af67844ac8cc945c7daac7d0f9543f9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
edd477dbc8adda75d10fab8561315caa423b50f2360f52450aad4b78b200c65774e4a73053081671649980199f72616fc6c7d1616377ba8a334282ee62556c27
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
19bfcc0f03528b28845627db016f8e11
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5507a77f25717e47a36c31a96127b9d05c582c8d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2c9def9400b412d1f2097e13f4dcdd663751b2210b67c3722464914ff5e09759
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9999a6b1e25ae1a236d16c3582a18a5131da32673602f0a3bb7b0c7d9b40e77fbab274e4ab47fa7291fb3db884271b93ccc70d819d9a87f3498b47d53839e532
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|