Location Accuracy


This Cordova/Phonegap plugin for Android and iOS to request enabling/changing of Location Services by triggering a native dialog from within the app, avoiding the need for the user to leave your app to change location settings manually.


Ionic 更改位置 Location Accuracy插件的安装(Installation)

ionic cordova plugin add cordova-plugin-request-location-accuracy npm install @ionic-native/location-accuracy

Ionic 更改位置 Location Accuracy插件支持的平台(Supported Platforms)

  • Android
  • iOS

Ionic 更改位置 Location Accuracy插件的用法(Usage)

import { LocationAccuracy } from '@ionic-native/location-accuracy';

constructor(private locationAccuracy: LocationAccuracy) { }


this.locationAccuracy.canRequest().then((canRequest: boolean) => {

  if(canRequest) {
    // the accuracy option will be ignored by iOS
      () => console.log('Request successful'),
      error => console.log('Error requesting location permissions', error)