7e11bad86f
Summary: We ran into a couple of problems with the implementation of `getCurrentPosition` on Android: - It sometimes returns an inaccurate location - It times out when `enableHighAccuracy` is `true` (#7495) This change improves `getCurrentPosition` for both of the above problems. Instead of calling `requestSingleUpdate` it now calls `requestLocationUpdates` so it can receive multiple locations giving it an opportunity to pick a better one. Unlike `requestSingleUpdate`, this approach doesn't seem to timeout when `enableHighAccuracy` is `true`. **Test plan (required)** Verified in a test app that `getCurrentPosition` returns a good location and doesn't timeout when `enableHighAccuracy` is `true`. Also, my team has been using this change in our app in production. Adam Comella Microsoft Corp. Closes https://github.com/facebook/react-native/pull/15094 Differential Revision: D5632100 Pulled By: hramos fbshipit-source-id: 86e40b01d941a13820cb775bccad7e19dba3d692 |
||
---|---|---|
.. | ||
libs | ||
src | ||
.npmignore | ||
DEFS | ||
DevExperience.md | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
release.gradle |
README.md
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.