Giter Club home page Giter Club logo

Comments (5)

christocracy avatar christocracy commented on August 23, 2024

Calling requestPermission() appears to only work once after the user makes their choice. After that he would have to manually go to the settings to activate the permissions again.

That’s correct. The OS gives you one shot to show the native permission dialog provided by the OS. The OS will not spam the user. If the user denies your request, it’s up to you to produce your own dialog and ask the user to “pretty please” enable desired permissions in your app Settings.

listen to .onProviderChange event to learn the current state of permissions.

from react-native-background-geolocation.

souzadeveloper avatar souzadeveloper commented on August 23, 2024

So in this case, if there are changes in permissions with monitoring already active, onProviderChange will identify this change and in this case, if the permission is denied, could I call stop()?

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

if the permission is denied, could I call stop()?

Why don’t you try it and see?

from react-native-background-geolocation.

souzadeveloper avatar souzadeveloper commented on August 23, 2024

ok, I'll do some tests. Thanks!

from react-native-background-geolocation.

souzadeveloper avatar souzadeveloper commented on August 23, 2024

Hi Chris, based on your experience with the plugin, if the user removes permissions when tracking is in progress in the background or with the application closed, it is better to call stop() to stop tracking or I can wait until it starts again location permissions? I'm worried if the connected plugin will consume battery even when it's without permissions.

Thanks!

from react-native-background-geolocation.

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.