React-native-geolocation-service: Not getting heading and speed parameter value

Created on 24 Jun 2018  路  6Comments  路  Source: Agontuk/react-native-geolocation-service

Hi,
I am using this package since it was first published but today I find out that I am not getting value for speed and heading parameter. I do not know what I did wrong. I am not an android developer please let me know what extra information you required to look into this issue.

Thanks

Most helpful comment

Location tracking is now available in 1.1.0.

All 6 comments

As far as I know, heading & speed will return 0 if you're not moving, or if you're using network provider instead of gps provider due to weak signal. I think you need to track location updates for getting heading & speed value. Tracking location is not yet implemented, but I'll do it soon.

thanks for your response @Agontuk. Tried with the movement and working fine. You can close this issue now.
BTW Waiting for the tracking location update for this package.

Location tracking is implemented in location-update branch. Feel free to try it out, I'll merge it to master after some testing.

Location tracking is now available in 1.1.0.

Hi @Agontuk
thank you for the watch position its working fine on my side.

Just a quick question. How these position options are working?
{ enableHighAccuracy: true, distanceFilter: 0, interval: 100000, fastestInterval: 30000 } for this configuration they are giving me location after each 1 minute and 40 seconds. Also they gps icon continuously showing in the notification area.

Is it the required behavior? How these options are working? please briefly explain to understand better for the watch position.

Since you set the interval to 100 second (1m 40s), it'll update the location in that interval. Fastest interval is 30 second, which means if somehow location data is updated by other apps before 1m 40s, your app will also get the update after 30 second has passed.

GPS icon will always show because you're using enableHighAccuracy. That means GPS will be used as long as watchPosition is running. I'll update the doc.

EDIT: doc updated.

Was this page helpful?
0 / 5 - 0 ratings