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

Geolocation plugin issue when using getCurrentPosition when watchPosition has failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 2.2.0, 3.0.0
    • None
    • None
    • 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

            Unassigned Unassigned
            filippo.possenti.geopal Filippo Possenti
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: