Geolocation can not watch the position.
See original GitHub issueGeolocation can not watch the position. It only updates when you go to homescreen and reopen the app. To recreate this problem, just use the example on React Native docs: http://facebook.github.io/react-native/releases/0.31/docs/geolocation.html#watchposition
componentDidMount(){
this.watchID = navigator.geolocation.watchPosition((position) => {
var lastPosition = JSON.stringify(position);
this.setState({lastPosition});
});
}
Using React Native version 0.31.0 & 0.30.0 on iOS.
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Geolocation.watchPosition() - Web APIs | MDN
The Geolocation method watchPosition() method is used to register a handler function that will be called automatically each time the ...
Read more >navigator.geolocation.watchPosition just not working
watchPosition() method is used to register a handler function that will be called automatically each time the position of the device changes.
Read more >Geolocation Watch Position throwing error - Ionic Forum
I've got the $cordovaGeolocation plugin installed and injected into my controller. I know the plugin is working because it is successfully ...
Read more >Turn Location Services and GPS on or off on your iPhone ...
Go to Settings > Privacy > Location Services. Make sure that Location Services is on. Scroll down to find the app. Tap the...
Read more >What you need to know while using the Geolocation API
Watching user location ... Sometimes accessing geolocation data once may not be sufficient, especially when the user is on the move. You will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing for now. Please re-open if this problem is still here!
I have the same problem which @briangainer has. @ericvicenti I think this issue should be opened.