dpa99c / cordova-plugin-request-location-accuracy

Cordova/Phonegap plugin for Android and iOS to request enabling/changing of Location Services by triggering a native dialog
96 stars 62 forks source link

Location Accuracy Plugin Nothing happens when I fire the function #55

Closed Ramakrishna1064 closed 6 years ago

Ramakrishna1064 commented 6 years ago

I built the following code in my phone,no errors anywhere,But when I click on the button i need to check either device location enable or not but using below code nothing happens i am using android 7.0 version can some one help me please and i just follow this link How to programatically enable and disable GPS in Ionic Framework or Cordova

start(){

    this.locationAccuracy.canRequest().then((canRequest: boolean) => {
      if(canRequest) {
        this.locationAccuracy.request(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(() => {
            console.log('Request successful.')
          },
          error => {
            console.log('Error requesting location permissions', error)
          }
        );
      }
    });
  }
dpa99c commented 6 years ago

Have you ensure the app has location authorisation before calling the code above?

Please read the documentation, in particular see the Full Android & iOS example section.

Also try building+running the example project to understand functionality of the plugin.

Please ask any further support questions on the Ionic Forums or Stackoverflow

Ramakrishna1064 commented 6 years ago

I am using https://ionicframework.com/docs/native/location-accuracy/ is this not working ?,If not what is the use of this plugin?

dpa99c commented 6 years ago

Ionic Native just provides a Typescript wrapper around the JS API of this Cordova plugin.

If you have an issue with the Ionic Native Typescript wrapper, raise it against Ionic Native.

Ramakrishna1064 commented 6 years ago

https://ampersandacademy.com/tutorials/ionic-framework-version-2/location-enable-request-using-the-location-accuracy-plugin what about this?

Ramakrishna1064 commented 6 years ago

So finally is there no code for resolve my issue?

dpa99c commented 6 years ago

Github issues are for reporting bugs or requesting features, not asking for help/support.

Ask on the Ionic Forum or StackOverflow.