Name Date Size #Lines LOC

..26-Sep-2023-

android/H26-Sep-2023-2,5851,991

build/H26-Sep-2023-1,594650

ios/H26-Sep-2023-1,6551,334

plugin/H26-Sep-2023-140127

src/H26-Sep-2023-1,546760

.eslintrc.jsH A D26-Sep-2023103 31

.gitignoreH A D26-Sep-202312 21

.npmignoreH A D26-Sep-2023183 128

CHANGELOG.mdH A D26-Sep-202314.9 KiB301164

README.mdH A D26-Sep-20232.7 KiB6544

app.plugin.jsH A D26-Sep-202357 21

babel.config.jsH A D26-Sep-2023104 31

package.jsonH A D26-Sep-20231.2 KiB4847

tsconfig.jsonH A D26-Sep-2023217 109

unimodule.jsonH A D26-Sep-202365 54

README.md

1<p>
2  <a href="https://docs.expo.dev/versions/latest/sdk/location/">
3    <img
4      src="../../.github/resources/expo-location.svg"
5      alt="expo-location"
6      height="64" />
7  </a>
8</p>
9
10Allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.
11
12# API documentation
13
14- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/location.mdx)
15- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/location/)
16
17# Installation in managed Expo projects
18
19For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/location/).
20
21# Installation in bare React Native projects
22
23For 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.
24
25### Add the package to your npm dependencies
26
27```
28npx expo install expo-location
29```
30
31### Configure for iOS
32
33Add `NSLocationAlwaysAndWhenInUseUsageDescription`, `NSLocationAlwaysUsageDescription` and `NSLocationWhenInUseUsageDescription` keys to your `Info.plist`:
34
35```xml
36<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
37<string>Allow $(PRODUCT_NAME) to use your location</string>
38<key>NSLocationAlwaysUsageDescription</key>
39<string>Allow $(PRODUCT_NAME) to use your location</string>
40<key>NSLocationWhenInUseUsageDescription</key>
41<string>Allow $(PRODUCT_NAME) to use your location</string>
42```
43
44Run `npx pod-install` after installing the npm package.
45
46### Configure for Android
47
48This module requires the permissions for approximate and exact device location. It also needs the foreground service permission to subscribe to location updates, while the app is in use. These permissions are automatically added.
49
50```xml
51<!-- Added permissions -->
52<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
53<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
54<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
55
56<!-- Optional permissions -->
57<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
58```
59
60> **Note:** on Android, you have to [submit your app for review and request access to use the background location permission](https://support.google.com/googleplay/android-developer/answer/9799150?hl=en).
61
62# Contributing
63
64Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
65