expo-location 13.0.3 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +32 -3
  2. package/README.md +3 -3
  3. package/android/build.gradle +4 -4
  4. package/android/src/main/java/expo/modules/location/LocationHelpers.java +1 -0
  5. package/android/src/main/java/expo/modules/location/LocationModule.java +6 -1
  6. package/android/src/main/java/expo/modules/location/exceptions/LocationUnavailableException.java +1 -1
  7. package/android/src/main/java/expo/modules/location/services/LocationTaskService.java +8 -3
  8. package/android/src/main/java/expo/modules/location/taskConsumers/GeofencingTaskConsumer.java +10 -1
  9. package/android/src/main/java/expo/modules/location/taskConsumers/LocationTaskConsumer.java +6 -0
  10. package/build/ExpoLocation.d.ts +1 -0
  11. package/build/ExpoLocation.d.ts.map +1 -0
  12. package/build/ExpoLocation.web.d.ts +1 -0
  13. package/build/ExpoLocation.web.d.ts.map +1 -0
  14. package/build/GeolocationPolyfill.d.ts +4 -0
  15. package/build/GeolocationPolyfill.d.ts.map +1 -0
  16. package/build/GeolocationPolyfill.js +11 -2
  17. package/build/GeolocationPolyfill.js.map +1 -1
  18. package/build/Location.d.ts +161 -29
  19. package/build/Location.d.ts.map +1 -0
  20. package/build/Location.js +183 -32
  21. package/build/Location.js.map +1 -1
  22. package/build/Location.types.d.ts +270 -18
  23. package/build/Location.types.d.ts.map +1 -0
  24. package/build/Location.types.js +57 -0
  25. package/build/Location.types.js.map +1 -1
  26. package/build/LocationEventEmitter.d.ts +1 -0
  27. package/build/LocationEventEmitter.d.ts.map +1 -0
  28. package/build/LocationEventEmitter.web.d.ts +1 -0
  29. package/build/LocationEventEmitter.web.d.ts.map +1 -0
  30. package/build/LocationGoogleGeocoding.d.ts +9 -0
  31. package/build/LocationGoogleGeocoding.d.ts.map +1 -0
  32. package/build/LocationGoogleGeocoding.js +13 -0
  33. package/build/LocationGoogleGeocoding.js.map +1 -1
  34. package/build/LocationSubscribers.d.ts +2 -1
  35. package/build/LocationSubscribers.d.ts.map +1 -0
  36. package/build/LocationSubscribers.js +1 -1
  37. package/build/LocationSubscribers.js.map +1 -1
  38. package/ios/EXLocation/EXLocation.m +3 -2
  39. package/ios/EXLocation.xcframework/ios-arm64/EXLocation.framework/EXLocation +0 -0
  40. package/ios/EXLocation.xcframework/ios-arm64/EXLocation.framework/Info.plist +0 -0
  41. package/ios/EXLocation.xcframework/ios-arm64_x86_64-simulator/EXLocation.framework/EXLocation +0 -0
  42. package/ios/EXLocation.xcframework/ios-arm64_x86_64-simulator/EXLocation.framework/Info.plist +0 -0
  43. package/package.json +7 -4
  44. package/plugin/build/withLocation.js +3 -3
  45. package/plugin/src/withLocation.ts +9 -7
  46. package/src/GeolocationPolyfill.ts +14 -2
  47. package/src/Location.ts +188 -35
  48. package/src/Location.types.ts +295 -26
  49. package/src/LocationGoogleGeocoding.ts +13 -0
  50. package/src/LocationSubscribers.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -10,14 +10,42 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 13.0.32021-10-21
13
+ ## 14.1.0 — 2022-01-26
14
14
 
15
- _This version does not introduce any user-facing changes._
15
+ ### 🐛 Bug fixes
16
+
17
+ - Allow location to work on Android with only coarse location permission. All apps do not require fine/precise location permission, but in past Expo was enforcing fine/precise even if you only needed coarse level location. ([#15760](https://github.com/expo/expo/pull/15760) by [@Noitidart](https://github.com/Noitidart))
16
18
 
17
- ## 13.0.2 — 2021-10-15
19
+ ## Unpublished
20
+
21
+ ### 🛠 Breaking changes
22
+
23
+ - Add an option to whether kill or keep the foreground service when app is killed on Android. ([#15633](https://github.com/expo/expo/pull/15633) by [@islamouzou](https://github.com/islamouzou))
24
+ - Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
25
+
26
+ ## 14.0.1 — 2021-12-15
18
27
 
19
28
  _This version does not introduce any user-facing changes._
20
29
 
30
+ ## 14.0.0 — 2021-12-03
31
+
32
+ ### 🛠 Breaking changes
33
+
34
+ - Remove deprecated `setApiKey` method. ([#14672](https://github.com/expo/expo/pull/14672) by [@Simek](https://github.com/Simek))
35
+
36
+ ### 🎉 New features
37
+
38
+ - Added steetNumber to `reverseGeocodeAsync` for iOS ([#13556](https://github.com/expo/expo/pull/13556) by [@chrisdrackett](https://github.com/chrisdrackett))
39
+
40
+ ### 🐛 Bug fixes
41
+
42
+ - Call `jobService.jobFinished` for the finished geofencing jobs. ([#14786](https://github.com/expo/expo/pull/14786) by [@mdmitry01](https://github.com/mdmitry01))
43
+ - Check for null value of `mLocationClient` to prevent a crash ([#15023](https://github.com/expo/expo/pull/15023) by [@zakharchenkoAndrii](https://github.com/zakharchenkoAndrii))
44
+
45
+ ### 💡 Others
46
+
47
+ - Extract nested `foregroundService` object from `LocationTaskOptions` type to the separate type `LocationTaskServiceOptions`. ([#14672](https://github.com/expo/expo/pull/14672) by [@Simek](https://github.com/Simek))
48
+
21
49
  ## 13.0.1 — 2021-10-01
22
50
 
23
51
  _This version does not introduce any user-facing changes._
@@ -38,6 +66,7 @@ _This version does not introduce any user-facing changes._
38
66
 
39
67
  - Fixed `Location.getCurrentPositionAsync` throwing `Location provider is unavailable.` error. ([#14281](https://github.com/expo/expo/pull/14281) by [@m1st4ke](https://github.com/m1st4ke))
40
68
  - Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
69
+ - Update error message for `LocationUnavailableException` on Android. ([#14539](https://github.com/expo/expo/pull/14539) by [@kylerjensen](https://github.com/kylerjensen))
41
70
 
42
71
  ### 💡 Others
43
72
 
package/README.md CHANGED
@@ -4,16 +4,16 @@ Allows reading geolocation information from the device. Your app can poll for th
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/location.md)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/location.md)
8
8
  - [Documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/location/)
9
9
 
10
10
  # Installation in managed Expo projects
11
11
 
12
- For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/location/).
12
+ For [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/location/).
13
13
 
14
14
  # Installation in bare React Native projects
15
15
 
16
- For bare React Native projects, you must ensure that you have [installed and configured the `react-native-unimodules` package](https://github.com/expo/expo/tree/master/packages/react-native-unimodules) before continuing.
16
+ For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
17
17
 
18
18
  ### Add the package to your npm dependencies
19
19
 
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '13.0.3'
6
+ version = '14.1.0'
7
7
 
8
8
  buildscript {
9
9
  // Simple helper that allows the root project to override versions declared by this library.
@@ -16,7 +16,7 @@ buildscript {
16
16
  }
17
17
 
18
18
  dependencies {
19
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
19
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.10')}")
20
20
  }
21
21
  }
22
22
 
@@ -57,7 +57,7 @@ android {
57
57
  minSdkVersion safeExtGet("minSdkVersion", 21)
58
58
  targetSdkVersion safeExtGet("targetSdkVersion", 30)
59
59
  versionCode 29
60
- versionName "13.0.3"
60
+ versionName "14.1.0"
61
61
  }
62
62
  lintOptions {
63
63
  abortOnError false
@@ -74,5 +74,5 @@ dependencies {
74
74
  transitive = false
75
75
  }
76
76
 
77
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
77
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.6.10')}"
78
78
  }
@@ -96,6 +96,7 @@ public class LocationHelpers {
96
96
 
97
97
  map.putString("city", address.getLocality());
98
98
  map.putString("district", address.getSubLocality());
99
+ map.putString("streetNumber", address.getSubThoroughfare());
99
100
  map.putString("street", address.getThoroughfare());
100
101
  map.putString("region", address.getAdminArea());
101
102
  map.putString("subregion", address.getSubAdminArea());
@@ -586,7 +586,12 @@ public class LocationModule extends ExportedModule implements LifecycleEventList
586
586
  * Checks whether all required permissions have been granted by the user.
587
587
  */
588
588
  private boolean isMissingForegroundPermissions() {
589
- return mPermissionsManager == null || !mPermissionsManager.hasGrantedPermissions(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION);
589
+ if (mPermissionsManager == null) {
590
+ return true;
591
+ }
592
+ boolean canAccessFineLocation = mPermissionsManager.hasGrantedPermissions(Manifest.permission.ACCESS_FINE_LOCATION);
593
+ boolean canAccessCoarseLocation = mPermissionsManager.hasGrantedPermissions(Manifest.permission.ACCESS_COARSE_LOCATION);
594
+ return !canAccessFineLocation && !canAccessCoarseLocation;
590
595
  }
591
596
 
592
597
  /**
@@ -5,7 +5,7 @@ import expo.modules.core.errors.CodedException;
5
5
 
6
6
  public class LocationUnavailableException extends CodedException implements CodedThrowable {
7
7
  public LocationUnavailableException() {
8
- super("Location provider is unavailable. Make sure that location services are enabled.");
8
+ super("Location is unavailable. Make sure that location services are enabled.");
9
9
  }
10
10
 
11
11
  @Override
@@ -20,8 +20,8 @@ import android.util.Log;
20
20
  public class LocationTaskService extends Service {
21
21
  private static final String TAG = "LocationTaskService";
22
22
  private static int sServiceId = 481756;
23
-
24
23
  private String mChannelId;
24
+ private String killService = "false";
25
25
  private Context mParentContext;
26
26
  private int mServiceId = sServiceId++;
27
27
  private final IBinder mBinder = new ServiceBinder();
@@ -64,8 +64,13 @@ public class LocationTaskService extends Service {
64
64
 
65
65
  @Override
66
66
  public void onTaskRemoved(Intent rootIntent) {
67
- super.onTaskRemoved(rootIntent);
68
- stop();
67
+ Bundle extras = rootIntent.getExtras();
68
+ extras.getString("killService");
69
+
70
+ if(killService == "true"){
71
+ super.onTaskRemoved(rootIntent);
72
+ stop();
73
+ }
69
74
  }
70
75
 
71
76
  public void startForeground(Bundle serviceOptions) {
@@ -26,6 +26,7 @@ import java.util.UUID;
26
26
  import org.unimodules.interfaces.taskManager.TaskConsumer;
27
27
  import org.unimodules.interfaces.taskManager.TaskManagerUtilsInterface;
28
28
  import org.unimodules.interfaces.taskManager.TaskConsumerInterface;
29
+ import org.unimodules.interfaces.taskManager.TaskExecutionCallback;
29
30
  import org.unimodules.interfaces.taskManager.TaskInterface;
30
31
  import expo.modules.location.LocationHelpers;
31
32
  import expo.modules.location.LocationModule;
@@ -135,8 +136,16 @@ public class GeofencingTaskConsumer extends TaskConsumer implements TaskConsumer
135
136
  if (mTask == null) {
136
137
  return false;
137
138
  }
138
- mTask.execute(bundle, null);
139
+ mTask.execute(bundle, null, new TaskExecutionCallback() {
140
+ @Override
141
+ public void onFinished(Map<String, Object> response) {
142
+ jobService.jobFinished(params, false);
143
+ }
144
+ });
139
145
  }
146
+
147
+ // Returning `true` indicates that the job is still running, but in async mode.
148
+ // In that case we're obligated to call `jobService.jobFinished` as soon as the async block finishes.
140
149
  return true;
141
150
  }
142
151
 
@@ -111,6 +111,10 @@ public class LocationTaskConsumer extends TaskConsumer implements TaskConsumerIn
111
111
  maybeReportDeferredLocations();
112
112
  } else {
113
113
  try {
114
+ if(mLocationClient == null){
115
+ Log.w(TAG, "LocationClient is null.");
116
+ return;
117
+ }
114
118
  mLocationClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>() {
115
119
  @Override
116
120
  public void onComplete(@NonNull Task<Location> task) {
@@ -230,6 +234,8 @@ public class LocationTaskConsumer extends TaskConsumer implements TaskConsumerIn
230
234
  // extras param name is appId for legacy reasons
231
235
  extras.putString("appId", mTask.getAppScopeKey());
232
236
  extras.putString("taskName", mTask.getName());
237
+ extras.putString("killService", serviceOptions.getString("killServiceOnDestroy"));
238
+
233
239
  serviceIntent.putExtras(extras);
234
240
 
235
241
  context.startForegroundService(serviceIntent);
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExpoLocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoLocation.d.ts","sourceRoot":"","sources":["../src/ExpoLocation.ts"],"names":[],"mappings":";AACA,wBAA+C"}
@@ -28,3 +28,4 @@ declare const _default: {
28
28
  stopObserving(): void;
29
29
  };
30
30
  export default _default;
31
+ //# sourceMappingURL=ExpoLocation.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoLocation.web.d.ts","sourceRoot":"","sources":["../src/ExpoLocation.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,eAAe,EAEhB,MAAM,kBAAkB,CAAC;AA2C1B;;;GAGG;AACH,iBAAe,mBAAmB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAsBhE;;;8BAQiC,QAAQ;QAAE,uBAAuB,EAAE,OAAO,CAAA;KAAE,CAAC;wCAMlE,wBAAwB,GAChC,QAAQ,cAAc,GAAG,IAAI,CAAC;qCAMM,eAAe,GAAG,QAAQ,cAAc,CAAC;oCAa/C,QAAQ,IAAI,CAAC;wCAGT,QAAQ,IAAI,CAAC;+BAGjB,QAAQ,OAAO,CAAC;oBAG3B,QAAQ,GAAG,EAAE,CAAC;2BAGP,QAAQ,GAAG,EAAE,CAAC;oCAGL,MAAM,WAAW,eAAe,GAAG,QAAQ,MAAM,CAAC;;+BAoBvD,QAAQ,kBAAkB,CAAC;yCAGjB,QAAQ,kBAAkB,CAAC;yCAG3B,QAAQ,kBAAkB,CAAC;qCAG/B,QAAQ,kBAAkB,CAAC;qCAG3B,QAAQ,kBAAkB,CAAC;;;;AA7EpE,wBAoFE"}
@@ -1 +1,5 @@
1
+ /**
2
+ * Polyfills `navigator.geolocation` for interop with the core React Native and Web API approach to geolocation.
3
+ */
1
4
  export declare function installWebGeolocationPolyfill(): void;
5
+ //# sourceMappingURL=GeolocationPolyfill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeolocationPolyfill.d.ts","sourceRoot":"","sources":["../src/GeolocationPolyfill.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAqBpD"}
@@ -2,10 +2,19 @@ import { Platform } from 'expo-modules-core';
2
2
  import ExpoLocation from './ExpoLocation';
3
3
  import { LocationAccuracy } from './Location.types';
4
4
  import { LocationSubscriber } from './LocationSubscribers';
5
+ // @needsAudit
6
+ /**
7
+ * Polyfills `navigator.geolocation` for interop with the core React Native and Web API approach to geolocation.
8
+ */
5
9
  export function installWebGeolocationPolyfill() {
6
10
  if (Platform.OS !== 'web') {
7
- // Polyfill navigator.geolocation for interop with the core react-native and web API approach to
8
- // geolocation
11
+ // Make sure `window.navigator` is defined in the global scope.
12
+ if (!('window' in global)) {
13
+ global.window = global;
14
+ }
15
+ if (!('navigator' in global.window)) {
16
+ global.window.navigator = {};
17
+ }
9
18
  // @ts-ignore
10
19
  window.navigator.geolocation = {
11
20
  getCurrentPosition,
@@ -1 +1 @@
1
- {"version":3,"file":"GeolocationPolyfill.js","sourceRoot":"","sources":["../src/GeolocationPolyfill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAkB,gBAAgB,EAAmB,MAAM,kBAAkB,CAAC;AACr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AsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAClE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC/C,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,6CAA6C;AAC7C,SAAS,UAAU,CAAC,OAAe;IACjC,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport ExpoLocation from './ExpoLocation';\nimport { LocationObject, LocationAccuracy, LocationOptions } from './Location.types';\nimport { LocationSubscriber } from './LocationSubscribers';\n\ntype GeolocationSuccessCallback = (data: LocationObject) => void;\ntype GeolocationErrorCallback = (error: any) => void;\n\ntype GeolocationOptions = {\n enableHighAccuracy?: boolean;\n};\n\nexport function installWebGeolocationPolyfill(): void {\n if (Platform.OS !== 'web') {\n // Polyfill navigator.geolocation for interop with the core react-native and web API approach to\n // geolocation\n // @ts-ignore\n window.navigator.geolocation = {\n getCurrentPosition,\n watchPosition,\n clearWatch,\n\n // We don't polyfill stopObserving, this is an internal method that probably should not even exist\n // in react-native docs\n stopObserving: () => {},\n };\n }\n}\n\nfunction convertGeolocationOptions(options: GeolocationOptions): LocationOptions {\n return {\n accuracy: options.enableHighAccuracy ? LocationAccuracy.High : LocationAccuracy.Balanced,\n };\n}\n\nfunction getCurrentPosition(\n success: GeolocationSuccessCallback,\n error: GeolocationErrorCallback = () => {},\n options: GeolocationOptions = {}\n): void {\n _getCurrentPositionAsyncWrapper(success, error, options);\n}\n\n// This function exists to let us continue to return undefined from getCurrentPosition, while still\n// using async/await for the internal implementation of it\nasync function _getCurrentPositionAsyncWrapper(\n success: GeolocationSuccessCallback,\n error: GeolocationErrorCallback,\n options: GeolocationOptions\n): Promise<any> {\n try {\n await ExpoLocation.requestPermissionsAsync();\n const result = await ExpoLocation.getCurrentPositionAsync(convertGeolocationOptions(options));\n success(result);\n } catch (e) {\n error(e);\n }\n}\n\n// Polyfill: navigator.geolocation.watchPosition\nfunction watchPosition(\n success: GeolocationSuccessCallback,\n error: GeolocationErrorCallback,\n options: GeolocationOptions\n) {\n const watchId = LocationSubscriber.registerCallback(success);\n\n ExpoLocation.watchPositionImplAsync(watchId, options).catch((err) => {\n LocationSubscriber.unregisterCallback(watchId);\n error({ watchId, message: err.message, code: err.code });\n });\n\n return watchId;\n}\n\n// Polyfill: navigator.geolocation.clearWatch\nfunction clearWatch(watchId: number) {\n LocationSubscriber.unregisterCallback(watchId);\n}\n"]}
1
+ {"version":3,"file":"GeolocationPolyfill.js","sourceRoot":"","sources":["../src/GeolocationPolyfill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAkB,gBAAgB,EAAmB,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAW3D,cAAc;AACd;;GAEG;AACH,MAAM,UAAU,6BAA6B;IAC3C,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,+DAA+D;QAC/D,IAAI,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE;YACzB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;SACxB;QACD,IAAI,CAAC,CAAC,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YACnC,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;SAC9B;QAED,aAAa;QACb,MAAM,CAAC,SAAS,CAAC,WAAW,GAAG;YAC7B,kBAAkB;YAClB,aAAa;YACb,UAAU;YAEV,kGAAkG;YAClG,uB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AC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,6CAA6C;AAC7C,SAAS,UAAU,CAAC,OAAe;IACjC,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport ExpoLocation from './ExpoLocation';\nimport { LocationObject, LocationAccuracy, LocationOptions } from './Location.types';\nimport { LocationSubscriber } from './LocationSubscribers';\n\ntype GeolocationSuccessCallback = (data: LocationObject) => void;\ntype GeolocationErrorCallback = (error: any) => void;\n\ntype GeolocationOptions = {\n enableHighAccuracy?: boolean;\n};\n\ndeclare const global: any;\n\n// @needsAudit\n/**\n * Polyfills `navigator.geolocation` for interop with the core React Native and Web API approach to geolocation.\n */\nexport function installWebGeolocationPolyfill(): void {\n if (Platform.OS !== 'web') {\n // Make sure `window.navigator` is defined in the global scope.\n if (!('window' in global)) {\n global.window = global;\n }\n if (!('navigator' in global.window)) {\n global.window.navigator = {};\n }\n\n // @ts-ignore\n window.navigator.geolocation = {\n getCurrentPosition,\n watchPosition,\n clearWatch,\n\n // We don't polyfill stopObserving, this is an internal method that probably should not even exist\n // in react-native docs\n stopObserving: () => {},\n };\n }\n}\n\nfunction convertGeolocationOptions(options: GeolocationOptions): LocationOptions {\n return {\n accuracy: options.enableHighAccuracy ? LocationAccuracy.High : LocationAccuracy.Balanced,\n };\n}\n\nfunction getCurrentPosition(\n success: GeolocationSuccessCallback,\n error: GeolocationErrorCallback = () => {},\n options: GeolocationOptions = {}\n): void {\n _getCurrentPositionAsyncWrapper(success, error, options);\n}\n\n// This function exists to let us continue to return undefined from getCurrentPosition, while still\n// using async/await for the internal implementation of it\nasync function _getCurrentPositionAsyncWrapper(\n success: GeolocationSuccessCallback,\n error: GeolocationErrorCallback,\n options: GeolocationOptions\n): Promise<any> {\n try {\n await ExpoLocation.requestPermissionsAsync();\n const result = await ExpoLocation.getCurrentPositionAsync(convertGeolocationOptions(options));\n success(result);\n } catch (e) {\n error(e);\n }\n}\n\n// Polyfill: navigator.geolocation.watchPosition\nfunction watchPosition(\n success: GeolocationSuccessCallback,\n error: GeolocationErrorCallback,\n options: GeolocationOptions\n) {\n const watchId = LocationSubscriber.registerCallback(success);\n\n ExpoLocation.watchPositionImplAsync(watchId, options).catch((err) => {\n LocationSubscriber.unregisterCallback(watchId);\n error({ watchId, message: err.message, code: err.code });\n });\n\n return watchId;\n}\n\n// Polyfill: navigator.geolocation.clearWatch\nfunction clearWatch(watchId: number) {\n LocationSubscriber.unregisterCallback(watchId);\n}\n"]}
@@ -3,62 +3,110 @@ import { LocationAccuracy, LocationCallback, LocationGeocodedAddress, LocationGe
3
3
  import { LocationEventEmitter } from './LocationEventEmitter';
4
4
  import { setGoogleApiKey } from './LocationGoogleGeocoding';
5
5
  import { _getCurrentWatchId } from './LocationSubscribers';
6
+ /**
7
+ * Check status of location providers.
8
+ * @return A promise which fulfills with an object of type [LocationProviderStatus](#locationproviderstatus).
9
+ */
6
10
  export declare function getProviderStatusAsync(): Promise<LocationProviderStatus>;
11
+ /**
12
+ * Asks the user to turn on high accuracy location mode which enables network provider that uses
13
+ * Google Play services to improve location accuracy and location-based services.
14
+ * @return A promise resolving as soon as the user accepts the dialog. Rejects if denied.
15
+ */
7
16
  export declare function enableNetworkProviderAsync(): Promise<void>;
8
17
  /**
9
18
  * Requests for one-time delivery of the user's current location.
10
19
  * Depending on given `accuracy` option it may take some time to resolve,
11
20
  * especially when you're inside a building.
21
+ * > __Note:__ Calling it causes the location manager to obtain a location fix which may take several
22
+ * > seconds. Consider using [`Location.getLastKnownPositionAsync`](#locationgetlastknownpositionasyncoptions)
23
+ * > if you expect to get a quick response and high accuracy is not required.
24
+ * @param options
25
+ * @return A promise which fulfills with an object of type [`LocationObject`](#locationobject).
12
26
  */
13
27
  export declare function getCurrentPositionAsync(options?: LocationOptions): Promise<LocationObject>;
14
28
  /**
15
- * Gets the last known position of the device or `null` if it's not available
16
- * or doesn't match given requirements such as maximum age or required accuracy.
17
- * It's considered to be faster than `getCurrentPositionAsync` as it doesn't request for the current location.
29
+ * Gets the last known position of the device or `null` if it's not available or doesn't match given
30
+ * requirements such as maximum age or required accuracy.
31
+ * It's considered to be faster than `getCurrentPositionAsync` as it doesn't request for the current
32
+ * location, but keep in mind the returned location may not be up-to-date.
33
+ * @param options
34
+ * @return A promise which fulfills with an object of type [LocationObject](#locationobject) or
35
+ * `null` if it's not available or doesn't match given requirements such as maximum age or required
36
+ * accuracy.
18
37
  */
19
38
  export declare function getLastKnownPositionAsync(options?: LocationLastKnownOptions): Promise<LocationObject | null>;
20
39
  /**
21
- * Starts watching for location changes.
22
- * Given callback will be called once the new location is available.
40
+ * Subscribe to location updates from the device. Please note that updates will only occur while the
41
+ * application is in the foreground. To get location updates while in background you'll need to use
42
+ * [Location.startLocationUpdatesAsync](#locationstartlocationupdatesasynctaskname-options).
43
+ * @param options
44
+ * @param callback This function is called on each location update. It receives an object of type
45
+ * [`LocationObject`](#locationobject) as the first argument.
46
+ * @return A promise which fulfills with a [`LocationSubscription`](#locationsubscription) object.
23
47
  */
24
- export declare function watchPositionAsync(options: LocationOptions, callback: LocationCallback): Promise<{
25
- remove(): void;
26
- }>;
48
+ export declare function watchPositionAsync(options: LocationOptions, callback: LocationCallback): Promise<LocationSubscription>;
27
49
  /**
28
- * Resolves to an object with current heading details.
29
- * To simplify, it calls `watchHeadingAsync` and waits for a couple of updates
30
- * and returns the one that is accurate enough.
50
+ * Gets the current heading information from the device. To simplify, it calls `watchHeadingAsync`
51
+ * and waits for a couple of updates, and then returns the one that is accurate enough.
52
+ * @return A promise which fulfills with an object of type [LocationHeadingObject](#locationheadingobject).
31
53
  */
32
54
  export declare function getHeadingAsync(): Promise<LocationHeadingObject>;
33
55
  /**
34
- * Starts watching for heading changes.
35
- * Given callback will be called once the new heading is available.
56
+ * Subscribe to compass updates from the device.
57
+ * @param callback This function is called on each compass update. It receives an object of type
58
+ * [LocationHeadingObject](#locationheadingobject) as the first argument.
59
+ * @return A promise which fulfills with a [`LocationSubscription`](#locationsubscription) object.
36
60
  */
37
61
  export declare function watchHeadingAsync(callback: LocationHeadingCallback): Promise<LocationSubscription>;
38
62
  /**
39
- * Geocodes given address to an array of latitude-longitude coordinates.
63
+ * Geocode an address string to latitude-longitude location.
64
+ * > **Note**: Geocoding is resource consuming and has to be used reasonably. Creating too many
65
+ * > requests at a time can result in an error, so they have to be managed properly.
66
+ * > It's also discouraged to use geocoding while the app is in the background and its results won't
67
+ * > be shown to the user immediately.
68
+ *
69
+ * > On Android, you must request a location permission (`Permissions.LOCATION`) from the user
70
+ * > before geocoding can be used.
71
+ * @param address A string representing address, eg. `"Baker Street London"`.
72
+ * @param options
73
+ * @return A promise which fulfills with an array (in most cases its size is 1) of [`LocationGeocodedLocation`](#locationgeocodedlocation) objects.
40
74
  */
41
75
  export declare function geocodeAsync(address: string, options?: LocationGeocodingOptions): Promise<LocationGeocodedLocation[]>;
42
76
  /**
43
- * The opposite behavior of `geocodeAsync` — translates location coordinates to an array of addresses.
77
+ * Reverse geocode a location to postal address.
78
+ * > **Note**: Geocoding is resource consuming and has to be used reasonably. Creating too many
79
+ * > requests at a time can result in an error, so they have to be managed properly.
80
+ * > It's also discouraged to use geocoding while the app is in the background and its results won't
81
+ * > be shown to the user immediately.
82
+ *
83
+ * > On Android, you must request a location permission (`Permissions.LOCATION`) from the user
84
+ * > before geocoding can be used.
85
+ * @param location An object representing a location.
86
+ * @param options
87
+ * @return A promise which fulfills with an array (in most cases its size is 1) of [`LocationGeocodedAddress`](#locationgeocodedaddress) objects.
44
88
  */
45
89
  export declare function reverseGeocodeAsync(location: Pick<LocationGeocodedLocation, 'latitude' | 'longitude'>, options?: LocationGeocodingOptions): Promise<LocationGeocodedAddress[]>;
46
90
  /**
47
- * Gets the current state of location permissions.
48
- * @deprecated Use `getForegroundPermissionsAsync()` or `getBackgroundPermissionsAsync()` instead.
91
+ * Checks user's permissions for accessing location.
92
+ * @return A promise that fulfills with an object of type [LocationPermissionResponse](#locationpermissionresponse).
93
+ * @deprecated __Deprecated.__ Use [`getForegroundPermissionsAsync`](#locationgetforegroundpermissionsasync) or [`getBackgroundPermissionsAsync`](#locationgetbackgroundpermissionsasync) instead.
49
94
  */
50
95
  export declare function getPermissionsAsync(): Promise<LocationPermissionResponse>;
51
96
  /**
52
- * Requests the user to grant location permissions.
53
- * @deprecated Use `requestForegroundPermissionsAsync()` or `requestBackgroundPermissionsAsync()` instead.
97
+ * Asks the user to grant permissions for location.
98
+ * @return A promise that fulfills with an object of type [LocationPermissionResponse](#locationpermissionresponse).
99
+ * @deprecated __Deprecated.__ Use [`requestForegroundPermissionsAsync`](#locationrequestforegroundpermissionsasync) or [`requestBackgroundPermissionsAsync`](#locationrequestbackgroundpermissionsasync) instead.
54
100
  */
55
101
  export declare function requestPermissionsAsync(): Promise<LocationPermissionResponse>;
56
102
  /**
57
- * Gets the current state of foreground location permissions.
103
+ * Checks user's permissions for accessing location while the app is in the foreground.
104
+ * @return A promise that fulfills with an object of type [PermissionResponse](#permissionresponse).
58
105
  */
59
106
  export declare function getForegroundPermissionsAsync(): Promise<LocationPermissionResponse>;
60
107
  /**
61
- * Requests the user to grant foreground location permissions.
108
+ * Asks the user to grant permissions for location while the app is in the foreground.
109
+ * @return A promise that fulfills with an object of type [PermissionResponse](#permissionresponse).
62
110
  */
63
111
  export declare function requestForegroundPermissionsAsync(): Promise<LocationPermissionResponse>;
64
112
  /**
@@ -72,16 +120,24 @@ export declare function requestForegroundPermissionsAsync(): Promise<LocationPer
72
120
  */
73
121
  export declare const useForegroundPermissions: (options?: PermissionHookOptions<object> | undefined) => [LocationPermissionResponse | null, () => Promise<LocationPermissionResponse>, () => Promise<LocationPermissionResponse>];
74
122
  /**
75
- * Gets the current state of background location permissions.
123
+ * Checks user's permissions for accessing location while the app is in the background.
124
+ * @return A promise that fulfills with an object of type [PermissionResponse](#permissionresponse).
76
125
  */
77
126
  export declare function getBackgroundPermissionsAsync(): Promise<PermissionResponse>;
78
127
  /**
79
- * Requests the user to grant background location permissions.
128
+ * Asks the user to grant permissions for location while the app is in the background.
129
+ * On __Android 11 or higher__: this method will open the system settings page - before that happens
130
+ * you should explain to the user why your application needs background location permission.
131
+ * For example, you can use `Modal` component from `react-native` to do that.
132
+ * > __Note__: Foreground permissions should be granted before asking for the background permissions
133
+ * (your app can't obtain background permission without foreground permission).
134
+ * @return A promise that fulfills with an object of type [PermissionResponse](#permissionresponse).
80
135
  */
81
136
  export declare function requestBackgroundPermissionsAsync(): Promise<PermissionResponse>;
82
137
  /**
83
138
  * Check or request permissions for the foreground location.
84
- * This uses both `requestBackgroundPermissionsAsync` and `getBackgroundPermissionsAsync` to interact with the permissions.
139
+ * This uses both `requestBackgroundPermissionsAsync` and `getBackgroundPermissionsAsync` to
140
+ * interact with the permissions.
85
141
  *
86
142
  * @example
87
143
  * ```ts
@@ -90,22 +146,98 @@ export declare function requestBackgroundPermissionsAsync(): Promise<PermissionR
90
146
  */
91
147
  export declare const useBackgroundPermissions: (options?: PermissionHookOptions<object> | undefined) => [PermissionResponse | null, () => Promise<PermissionResponse>, () => Promise<PermissionResponse>];
92
148
  /**
93
- * Returns `true` if the device has location services enabled or `false` otherwise.
149
+ * Checks whether location services are enabled by the user.
150
+ * @return A promise which fulfills to `true` if location services are enabled on the device,
151
+ * or `false` if not.
94
152
  */
95
153
  export declare function hasServicesEnabledAsync(): Promise<boolean>;
96
154
  export declare function isBackgroundLocationAvailableAsync(): Promise<boolean>;
155
+ /**
156
+ * Registers for receiving location updates that can also come when the app is in the background.
157
+ * @param taskName Name of the task receiving location updates.
158
+ * @param options An object of options passed to the location manager.
159
+ * @return A promise resolving once the task with location updates is registered.
160
+ *
161
+ * # Task parameters
162
+ *
163
+ * Background location task will be receiving following data:
164
+ * - `locations` - An array of the new locations.
165
+ *
166
+ * ```ts
167
+ * import * as TaskManager from 'expo-task-manager';
168
+ *
169
+ * TaskManager.defineTask(YOUR_TASK_NAME, ({ data: { locations }, error }) => {
170
+ * if (error) {
171
+ * // check `error.message` for more details.
172
+ * return;
173
+ * }
174
+ * console.log('Received new locations', locations);
175
+ * });
176
+ * ```
177
+ */
97
178
  export declare function startLocationUpdatesAsync(taskName: string, options?: LocationTaskOptions): Promise<void>;
179
+ /**
180
+ * Stops geofencing for specified task.
181
+ * @param taskName Name of the background location task to stop.
182
+ * @return A promise resolving as soon as the task is unregistered.
183
+ */
98
184
  export declare function stopLocationUpdatesAsync(taskName: string): Promise<void>;
185
+ /**
186
+ * @param taskName Name of the location task to check.
187
+ * @return A promise which fulfills with boolean value indicating whether the location task is
188
+ * started or not.
189
+ */
99
190
  export declare function hasStartedLocationUpdatesAsync(taskName: string): Promise<boolean>;
191
+ /**
192
+ * Starts geofencing for given regions. When the new event comes, the task with specified name will
193
+ * be called with the region that the device enter to or exit from.
194
+ * If you want to add or remove regions from already running geofencing task, you can just call
195
+ * `startGeofencingAsync` again with the new array of regions.
196
+ * @param taskName Name of the task that will be called when the device enters or exits from specified regions.
197
+ * @param regions Array of region objects to be geofenced.
198
+ * @return A promise resolving as soon as the task is registered.
199
+ *
200
+ * # Task parameters
201
+ *
202
+ * Geofencing task will be receiving following data:
203
+ * - `eventType` - Indicates the reason for calling the task, which can be triggered by entering or exiting the region.
204
+ * See [GeofencingEventType](#geofencingeventtype).
205
+ * - `region` - Object containing details about updated region. See [LocationRegion](#locationregion) for more details.
206
+ *
207
+ * # Example
208
+ * ```ts
209
+ * import { GeofencingEventType } from 'expo-location';
210
+ * import * as TaskManager from 'expo-task-manager';
211
+ *
212
+ * TaskManager.defineTask(YOUR_TASK_NAME, ({ data: { eventType, region }, error }) => {
213
+ * if (error) {
214
+ * // check `error.message` for more details.
215
+ * return;
216
+ * }
217
+ * if (eventType === GeofencingEventType.Enter) {
218
+ * console.log("You've entered region:", region);
219
+ * } else if (eventType === GeofencingEventType.Exit) {
220
+ * console.log("You've left region:", region);
221
+ * }
222
+ * });
223
+ * ```
224
+ */
100
225
  export declare function startGeofencingAsync(taskName: string, regions?: LocationRegion[]): Promise<void>;
226
+ /**
227
+ * Stops geofencing for specified task. It unregisters the background task so the app will not be
228
+ * receiving any updates, especially in the background.
229
+ * @param taskName Name of the task to unregister.
230
+ * @return A promise resolving as soon as the task is unregistered.
231
+ */
101
232
  export declare function stopGeofencingAsync(taskName: string): Promise<void>;
102
- export declare function hasStartedGeofencingAsync(taskName: string): Promise<boolean>;
103
233
  /**
104
- * @deprecated
105
- * Deprecated as of SDK39 in favour of `setGoogleApiKey`.
234
+ * @param taskName Name of the geofencing task to check.
235
+ * @return A promise which fulfills with boolean value indicating whether the geofencing task is
236
+ * started or not.
106
237
  */
107
- export declare function setApiKey(apiKey: string): void;
238
+ export declare function hasStartedGeofencingAsync(taskName: string): Promise<boolean>;
108
239
  export { LocationEventEmitter as EventEmitter, _getCurrentWatchId };
109
240
  export { LocationAccuracy as Accuracy, LocationActivityType as ActivityType, LocationGeofencingEventType as GeofencingEventType, LocationGeofencingRegionState as GeofencingRegionState, PermissionStatus, PermissionHookOptions, setGoogleApiKey, };
110
241
  export { installWebGeolocationPolyfill } from './GeolocationPolyfill';
111
242
  export * from './Location.types';
243
+ //# sourceMappingURL=Location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../src/Location.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EAGtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,EACd,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wB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