React-native-background-geolocation: maxLocations: 1 doesnt work?

Created on 13 Nov 2017  路  3Comments  路  Source: mauron85/react-native-background-geolocation

I don't want to store my locations, just use the position on moment. My config:

BackgroundGeolocation.configure({
            desiredAccuracy: 10,
            stationaryRadius: 50,
            distanceFilter: 50,
            locationTimeout: 30,
            debug: false,
            startOnBoot: false,
            stopOnTerminate: true,
            locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,
            interval: 30000,
            fastestInterval: 15000,
            activitiesInterval: 10000,
            stopOnStillActivity: false,
            maxLocations: 1,
            startForeground: false,
        });

And getLocations gives me:

(96) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]

EDIT

"react": "^16.0.0",
"react-native": "^0.50.3",
"react-native-mauron85-background-geolocation": "^0.4.0-alpha.6",
bug

Most helpful comment

All 3 comments

Fixed in 0.4.0-rc.2

Thank you!

Was this page helpful?
0 / 5 - 0 ratings