question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

enableLocationRequest does not return on enabling or denying

See original GitHub issue

It does resolve if location is already enabled.

But it does neither reject if location permission is denied or resolve if permission was granted and location was enabled.

Or am I doing something wrong?

geolocation.enableLocationRequest()
  .then(resolved => {
    console.log('resolved')
  })
  .catch(rejected =>{
    console.log('rejected')
  })

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ickatacommented, Nov 1, 2017

I confirm that enableLocationRequest promise is never resolved on Android. I am testing on 7.1 emulator.

      geolocation.enableLocationRequest().then( function () {
         // I never get here...
      });
0reactions
ickatacommented, Nov 1, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Geolocation: right way to use getCurrentLocation promise ...
isEnabled()) { return Geolocation.enableLocationRequest(); // return a Promise } else { // No need to return anything here. // `undefined` ...
Read more >
Geolocation - NativeScript Docs
In situation of poor or no GPS signal, but available Wi-Fi it will take 10 sec to return location. watchLocation(successCallback: successCallbackType ...
Read more >
geolocator 8.0.3 | Flutter Package - Pub.dev
When the location services are not enabled or permissions /// are denied the `Future` will return an error. Future<Position> _determinePosition() async ...
Read more >
Track The Device Geolocation In A NativeScript Angular ...
In the above we call the enableLocationRequest method which will resolve if permission is granted or if permission is already granted. After we ......
Read more >
Getting Location in NativeScript - Raymond Camden
On my Android this resulted in a prompt the first time but not again. Then isEnabled call will return true or false and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found