Giter Club home page Giter Club logo

Comments (6)

Agontuk avatar Agontuk commented on May 27, 2024 2

It's possible, I'll take a look. Maybe we can expose another option to disable the dialog like this -

Geolocation.getCurrentPosition(
    (success) => {},
    (error) => {},
    { enableHighAccuracy: true, showLocationDialog: false }
);

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 27, 2024 1

New version is released with the option to disable location dialog.

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 27, 2024

If user cancel, you'll get an error object in the error callback with code 5. If the alert is appearing again, it means you're probably requesting location again on error callback. Check your code.

from react-native-geolocation-service.

matthieupinte avatar matthieupinte commented on May 27, 2024

Yes, you're right, my bad...

from react-native-geolocation-service.

matthieupinte avatar matthieupinte commented on May 27, 2024

You're right, I'm asking 2-3 times getCurrentPosition... this is not good.
I didn't see that before, because, when navigator.geolocation.getCurrentPosition failed in RN (because no permission granted), no "notifications"/alert are shown.
With your package, here, you're always asking user if he is agree by using Google's location service (cause it will change it's settings directly)...

I need to find a way to don't ask again by your package getCurrentPosition if it's because of SETTINGS_NOT_SATISFIED... by a boolean... but also need to find if he changed is settings directly.

Just need to know if Location settings are ok or not, before ask getCurrentPosition with your package... like that, the alert "Change location settings" will not appear

from react-native-geolocation-service.

zsajjad avatar zsajjad commented on May 27, 2024

Can we make this prompt optional? I have a scenario where I want device's location only when location service is enabled else app will proceed without location data. With current flow, app waits at the very beginning unless user responds to this dialog.

from react-native-geolocation-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.