Skip to content

navigator.geolocation.watchPosition not working #6

@ravi-pandit14

Description

@ravi-pandit14

Description
I am facing geolocation.watchPosition issue. This not working in your example project.
Issue
In my case I am using "react-native-geolocation-service" dependency and i have also use "@react-native-community/geolocation" It's does not return position continuously.
My code

watchGeolocation = () => {
       console.log('watchGeolocation')
       this.watchID = Geolocation.watchPosition(position => {
           const lastPosition = JSON.stringify(position);
           console.log(lastPosition); // only first time display log
           setwatch(position.coords.latitude)
       },(error) => console.log(JSON.stringify(error)),
       {enableHighAccuracy: true,interval:500,useSignificantChanges:true});
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions