# react-native-require-location

> A react-native component for requiring location services in an application

Latest version **0.0.8** (published 2016-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-require-location
pnpm add react-native-require-location
yarn add react-native-require-location
bun add react-native-require-location
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2016-11-08 |
| First published | 2016-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | jpig |
| Keywords | react-component, react-native, react-native-module, android, android-location-services, geo-location, location-services, require-location-services, react-native-require-location, react-native-location-services |

## Links

- npm: https://www.npmjs.com/package/react-native-require-location
- Repository: https://github.com/JPig/react-native-require-location
- Homepage: https://github.com/JPig/react-native-require-location#readme
- Issues: https://github.com/JPig/react-native-require-location/issues
- npm.io page: https://npm.io/package/react-native-require-location

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2016-11-08
- 0.0.7 — 2016-10-26
- 0.0.6 — 2016-10-26
- 0.0.5 — 2016-10-11
- 0.0.4 — 2016-10-11
- 0.0.3 — 2016-10-11
- 0.0.2 — 2016-10-11
- 0.0.1 — 2016-10-11

## README

### React Native Location Services Requiring

a React Native module for requiring location services be enabled or turned on

### Installation

1. `npm install react-native-require-location --save`
2. `react-native link react-native-require-location`


### Usage

```
  import LocationServicesRequired from 'react-native-require-location';
  
  LocationServicesRequired.showSettings({
    message: "<h2>Use Location ?</h2>This app wants to change your device settings:<br/><br/>Use GPS, Wi-Fi, and cell network for location<br/><br/>",
    ok: "YES",
    cancel: "NO"
  }).then(success => {
    
    //can attempt to access location now
    
  }).catch(error => {
      
    //handle error
    
  }); 
  
```

### Notes

the package will auto "close" (it will put the app to the background) the app
hinting to the user that location is required to use the app

---
_Source: https://npm.io/package/react-native-require-location · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
