Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13645

Geolocation plugin issue when using getCurrentPosition when watchPosition has failed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0, 3.0.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Android 7.0 custom ROM on a test Nexus 4, but believed to exist on other devices.

      Description

      1. Turn off geolocation services on the phone through the settings
      2. start the app
      3. setup a watch using navigator.geolocation.watchPosition
      4. call navigator.geolocation.getCurrentPosition
      5. observe that it will fail, which is correct
      6. without terminating the app, turn on geolocation services on the phone through the settings
      7. wait a bit and call again navigator.geolocation.getCurrentPosition
      8. observe that it will fail, which is no longer correct
      9. clear a watch using navigator.geolocation.clearWatch
      10. wait a bit and call again navigator.geolocation.getCurrentPosition
      11. observe that this time it will succeed

      The expected behaviour was for the call to navigator.geolocation.getCurrentPosition to succeed (steps 7 and 8).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              filippo.possenti.geopal Filippo Possenti
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: