Giter Club home page Giter Club logo

Comments (6)

souzadeveloper avatar souzadeveloper commented on July 21, 2024

Hi Chris, we purchased the License, I await your responses so we can move forward. Thanks!

from react-native-background-geolocation.

christocracy avatar christocracy commented on July 21, 2024
  1. Implementing any event-listener is optional. Just like wiring up speakers to your stereo system is optional.
  1. Because I noticed that sometimes the plugin starts right after ready().

When you call .start(), the plugin is enabled forever until you call .stop() (see State.enabled). The plugin persists its state in permanent storage. Calling .ready(config). restores the last known State.enabled.

3 - getCurrentPosition returns the current position if I am in a Moving state and the last known position when I am in a stationary state? Any settings to return the most accurate position possible?

Observe your logs in $ adb logcat for warnings (se Wiki "Debugging"). Android does not always allow your app to turn on location-services when the app is in the background with the plugin in the stationary state.

  1. How do I know if users have granted the necessary permissions for the plugin to fetch the location

See API docs .onProviderChange.

from react-native-background-geolocation.

souzadeveloper avatar souzadeveloper commented on July 21, 2024

Chris,

1 - So if I enable preventSupend for iOS and don't implement hearbeat, iOS will continue to respond to the onLocation event normally when the application is closed?

3 - The objective is to use getCurrentPosition only in the Foreground. In this case, is the position real regardless of whether the state is moving or stationary?

Thanks!

from react-native-background-geolocation.

christocracy avatar christocracy commented on July 21, 2024

So if I enable preventSupend for iOS and don't implement hearbeat, iOS will continue to respond to the onLocation event normally when the application is closed?

99% of use-cases do NOT require preventSuspend. You probably don't need preventSuspend. I don't think you understand what it is. It's not some magic feature. preventSuspend does NOT work when the app is terminated. I suggest you forget you ever heard of preventSuspend.

See the API docs Config.stopOnTerminate. iOS is fully capable of continuing to track location after app terminate (once the device moves at least 200 meters). preventSuspend is NOT required for this. There is no way to overcome the "200 meter requirement".

The objective is to use getCurrentPosition only in the Foreground. In this case, is the position real regardless of whether the state is moving or stationary?

There is no issue with .getCurrentPosition in the foreground. Are you reading the API docs?

from react-native-background-geolocation.

souzadeveloper avatar souzadeveloper commented on July 21, 2024

Ok Chris Thanks!

from react-native-background-geolocation.

christocracy avatar christocracy commented on July 21, 2024

I already told you to forget about preventSuspend

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.