-
Notifications
You must be signed in to change notification settings - Fork 25k
Support geolocation in android webview #8305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
By analyzing the blame information on this pull request, we identified @mkonicek and @nicklockwood to be potential reviewers. |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
|
I just tested this PR and it worked right away 👍 I just followed the instructions to re-build React Native from source and my app which has a webview that loads an url which uses geolocation just worked! @mkonicek @nicklockwood is there anything I can do to help with this PR? |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
@jvassbo a test failed, try to merge master and re-run? |
|
@danielbraun not sure why the circleci build failed now, it looks like |
|
@jvassbo I suggest you try again, it sometimes fails for weird reasons. |
|
@danielbraun Took a couple of tries, but now both CircleCI and Travis builds are green. |
|
@jvassbo great. Mine also took a few times. |
|
@facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to Phabricator to review internal test results. |
Summary: Makes sure request for geolocation use in the webview is handled. This solves issue facebook#7609 Currently use of geolocation in webview fails silently, as the permission request is never received by the native app. **Test plan (required)** 1. Create new project with webview 2. Add javascript for geolocation: ```javascript navigator.geolocation.getCurrentPosition(function (position) { console.log('success', position) }, function (error) { console.log('could not determine position', error) }) ``` 3. Run code and assert geolocation permission is requested, resulting in success (or error) callback being called Closes facebook#8305 Differential Revision: D3592887 fbshipit-source-id: 84fe2383fba8873431c5e89d154c0a4fd58ffb70
Summary: Makes sure request for geolocation use in the webview is handled. This solves issue facebook#7609 Currently use of geolocation in webview fails silently, as the permission request is never received by the native app. **Test plan (required)** 1. Create new project with webview 2. Add javascript for geolocation: ```javascript navigator.geolocation.getCurrentPosition(function (position) { console.log('success', position) }, function (error) { console.log('could not determine position', error) }) ``` 3. Run code and assert geolocation permission is requested, resulting in success (or error) callback being called Closes facebook#8305 Differential Revision: D3592887 fbshipit-source-id: 84fe2383fba8873431c5e89d154c0a4fd58ffb70
Summary: Makes sure request for geolocation use in the webview is handled. This solves issue facebook#7609 Currently use of geolocation in webview fails silently, as the permission request is never received by the native app. **Test plan (required)** 1. Create new project with webview 2. Add javascript for geolocation: ```javascript navigator.geolocation.getCurrentPosition(function (position) { console.log('success', position) }, function (error) { console.log('could not determine position', error) }) ``` 3. Run code and assert geolocation permission is requested, resulting in success (or error) callback being called Closes facebook#8305 Differential Revision: D3592887 fbshipit-source-id: 84fe2383fba8873431c5e89d154c0a4fd58ffb70
|
Experience same issue while building app for my web-site. Is this PR already included into react-native v0.35.0 ? |
|
@vadimeremeev this was included in the v0.31.0 release so it should also work on that version, altho I haven't tried that specific release. |
Summary:
Makes sure request for geolocation use in the webview is handled.
This solves issue #7609
Currently use of geolocation in webview fails silently, as the permission request is never received by the native app.
**Test plan (required)**
1. Create new project with webview
2. Add javascript for geolocation:
```javascript
navigator.geolocation.getCurrentPosition(function (position) {
console.log('success', position)
}, function (error) {
console.log('could not determine position', error)
})
```
3. Run code and assert geolocation permission is requested, resulting in success (or error) callback being called
Closes facebook/react-native#8305
Differential Revision: D3592887
fbshipit-source-id: 84fe2383fba8873431c5e89d154c0a4fd58ffb70
Makes sure request for geolocation use in the webview is handled.
This solves issue #7609
Currently use of geolocation in webview fails silently, as the permission request is never received by the native app.
Test plan (required)