Giter Club home page Giter Club logo

Comments (13)

christocracy avatar christocracy commented on August 23, 2024

https://github.com/transistorsoft/react-native-background-geolocation/wiki/Error-Codes

I'm getting rid of the minimimAccuracy filtering

On Tuesday, November 24, 2015, twelvearrays [email protected]
wrote:

I have an iPhone 5 with No service I am using to test my app along with
several beta tester with iPhone 5s. I do not receive an failure callback in
the designated timeout. I do however receive an error 100 randomly after
this call anywhere between 1 minute and up to 8 minutes usually till
indefinitely. I have also written another simple location library that gets
the current location of the device and that works. Meaning that the GPS
does have a current location. Seems like the timeout for the error 100
isn't timing out?

BackgroundGeolocation.getCurrentPosition({
persist: true,
timeout: 10, // 30 second timeout to fetch location
maximumAge: 5000, // Accept the last-known-location if not older than 5000
ms.
minimumAccuracy: 50, // Fetch a location with a minimum accuracy of 10
meters.
}, function(location) {
// This location is already persisted to plugin’s SQLite db.
// If you’ve configured #autoSync: true, the HTTP POST has already started.
console.log('- Current position received: ', location);
}, function(errorCode) {
alert('An location error occurred: ' + errorCode + ' ');
});


Reply to this email directly or view it on GitHub
#33
.

Snet form Gmail Mobile

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

Get rid of your minimumAccuracy

On Tuesday, November 24, 2015, twelvearrays [email protected]
wrote:

I have an iPhone 5 with No service I am using to test my app along with
several beta tester with iPhone 5s. I do not receive an failure callback in
the designated timeout. I do however receive an error 100 randomly after
this call anywhere between 1 minute and up to 8 minutes usually till
indefinitely. I have also written another simple location library that gets
the current location of the device and that works. Meaning that the GPS
does have a current location. Seems like the timeout for the error 100
isn't timing out?

BackgroundGeolocation.getCurrentPosition({
persist: true,
timeout: 10, // 30 second timeout to fetch location
maximumAge: 5000, // Accept the last-known-location if not older than 5000
ms.
minimumAccuracy: 50, // Fetch a location with a minimum accuracy of 10
meters.
}, function(location) {
// This location is already persisted to plugin’s SQLite db.
// If you’ve configured #autoSync: true, the HTTP POST has already started.
console.log('- Current position received: ', location);
}, function(errorCode) {
alert('An location error occurred: ' + errorCode + ' ');
});


Reply to this email directly or view it on GitHub
#33
.

Snet form Gmail Mobile

from react-native-background-geolocation.

twelvearrays avatar twelvearrays commented on August 23, 2024

Let me know when you have an update with this removed. Be happy to test. As always thanks for the quick response!

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

Probably tonight

On Tuesday, November 24, 2015, twelvearrays [email protected]
wrote:

Let me know when you have an update with this removed. Be happy to test.
As always thanks for the quick response!


Reply to this email directly or view it on GitHub
#33 (comment)
.

Snet form Gmail Mobile

from react-native-background-geolocation.

twelvearrays avatar twelvearrays commented on August 23, 2024

I have noticed turning my wifi on or off forces the getCurrentPosition call to complete and return successfully.

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

You definitely want to keep Wifi ON when attempting to track a user's
position. Native geolocation (on any platform; iOS, Android) aggregates 3
sources together to achieve the best possible accuracy.

  • GPS
  • Wifi triangulation
  • Cell-tower triangulation

On Wed, Nov 25, 2015 at 9:20 AM, twelvearrays [email protected]
wrote:

I have noticed turning my wifi on or off forces the getCurrentPosition
call to complete and return successfully.


Reply to this email directly or view it on GitHub
#33 (comment)
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from react-native-background-geolocation.

twelvearrays avatar twelvearrays commented on August 23, 2024

Good to know! I will put a check in my code if wifi is enabled. Still get the weird timeout times with error 100 though even with wifi on. Thanks for the insight.

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

The library currently throws out any received location having accuracy >
1000. When it sees a low-accuracy location like this, it fires the error
code 100.

This merely means you're receiving poor-accuracy locations. When I post
the latest version, you'll no longer see error code 100 -- you'll see
really poor accuracy locations instead.

On Wed, Nov 25, 2015 at 9:39 AM, twelvearrays [email protected]
wrote:

Good to know! I will put a check in my code if wifi is enabled. Still get
the weird timeout times with error 100 though even with wifi on. Thanks for
the insight.


Reply to this email directly or view it on GitHub
#33 (comment)
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from react-native-background-geolocation.

twelvearrays avatar twelvearrays commented on August 23, 2024

Ok sounds good! Look forward to the update.

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

Try out my new Android Demo App

from react-native-background-geolocation.

twelvearrays avatar twelvearrays commented on August 23, 2024

Did 0.1.2 get rid of minimumAccuracy?

from react-native-background-geolocation.

christocracy avatar christocracy commented on August 23, 2024

yes

On Fri, Nov 27, 2015 at 11:59 AM, twelvearrays [email protected]
wrote:

Did 0.1.2 get rid of minimumAccuracy?


Reply to this email directly or view it on GitHub
#33 (comment)
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from react-native-background-geolocation.

twelvearrays avatar twelvearrays commented on August 23, 2024

Awesome! As always, great work and fast response! 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.