# cordova-plugin-gps

> This plugin allows to turn on the gps like Google Maps.

Latest version **0.2.2** (published 2019-06-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-gps
pnpm add cordova-plugin-gps
yarn add cordova-plugin-gps
bun add cordova-plugin-gps
```

## 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.2.2 |
| Published | 2019-06-22 |
| First published | 2019-06-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Daniele Tulone |
| Maintainers | danieletulonejs |
| Keywords | ecosystem:cordova, cordova-android, cordova-gps, gps |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-gps
- Repository: https://github.com/danieletulone/cordova-plugin-gps
- Homepage: https://github.com/danieletulone/cordova-plugin-gps#readme
- Issues: https://github.com/danieletulone/cordova-plugin-gps/issues
- npm.io page: https://npm.io/package/cordova-plugin-gps

## 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.2.2 (latest) — 2019-06-22
- 0.2.1 — 2019-06-21
- 0.2.0 — 2019-06-20
- 0.1.14 — 2019-06-20
- 0.1.13 — 2019-06-06
- 0.1.12 — 2019-06-06
- 0.1.1 — 2019-06-06
- 0.1.0 — 2019-06-06

## README

# Cordova Plugin Gps #

This plugin allows to turn on the gps if that is disabled.
If gps is disabled it will show a dialog: by press OK button the app will be able to turn on the GPS.

## Platform Available ##
Only Android

## Installation ##
Install it with npm.

`npm i cordova-plugin-gps`

## How To Use ##

### Simple Use
Call enableGps method in your js.

```javascript

    // Example of Use
    cordova.plugins.cordovaplugingps.enableGps(function(enabled){
        // User can press ok or not
        if (enabled) {
            alert("Gps enabled!");
        } else {
            alert("Gps disabled!");
        }
    }, function(err) {
        alert('An error occurred: ' + err);
    });

```

### Force to active / Recursive Request ###

```javascript

    function requestGpsActivation () {
        // Example of Use
        cordova.plugins.cordovaplugingps.enableGps(function(enabled){
            // User can press ok or not
            if (enabled) {
                alert("Gps enabled!");
            } else {
                requestGpsActivation();
            }
        }, function(err) {
            alert('An error occurred: ' + err);
        });
    }    

    requestGpsActivation();

```

#### Author ####
Daniele Tulone

---
_Source: https://npm.io/package/cordova-plugin-gps · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
