Skip to content

Conversation

@jvassbo
Copy link
Contributor

@jvassbo jvassbo commented Jun 22, 2016

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:
navigator.geolocation.getCurrentPosition(function (position) {
  console.log('success', position)
}, function (error) {
  console.log('could not determine position', error)
})
  1. Run code and assert geolocation permission is requested, resulting in success (or error) callback being called

@ghost
Copy link

ghost commented Jun 22, 2016

By analyzing the blame information on this pull request, we identified @mkonicek and @nicklockwood to be potential reviewers.

@ghost
Copy link

ghost commented Jun 22, 2016

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!

@bbay
Copy link

bbay commented Jul 12, 2016

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?

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 12, 2016
@danielbraun
Copy link
Contributor

@jvassbo a test failed, try to merge master and re-run?

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2016
@jvassbo
Copy link
Contributor Author

jvassbo commented Jul 15, 2016

@danielbraun not sure why the circleci build failed now, it looks like code-analysis-bot.js was unable to find the changed files in this PR..

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2016
@danielbraun
Copy link
Contributor

@jvassbo I suggest you try again, it sometimes fails for weird reasons.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 16, 2016
@jvassbo
Copy link
Contributor Author

jvassbo commented Jul 20, 2016

@danielbraun Took a couple of tries, but now both CircleCI and Travis builds are green.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 20, 2016
@danielbraun
Copy link
Contributor

@jvassbo great. Mine also took a few times.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 20, 2016
@satya164
Copy link
Contributor

@facebook-github-bot shipit

@ghost ghost added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Jul 20, 2016
@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review internal test results.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 20, 2016
@ghost ghost closed this in b7bf24b Jul 20, 2016
@jvassbo jvassbo deleted the geolocation_in_webview branch July 20, 2016 13:08
fadils pushed a commit to fadils/react-native that referenced this pull request Jul 21, 2016
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
bubblesunyum pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
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
mpretty-cyro pushed a commit to HomePass/react-native that referenced this pull request Aug 25, 2016
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
@vadimeremeev
Copy link

Experience same issue while building app for my web-site. Is this PR already included into react-native v0.35.0 ?

@bbay
Copy link

bbay commented Oct 19, 2016

@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.

tungdo194 pushed a commit to tungdo194/rn-test that referenced this pull request Apr 28, 2024
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
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants