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

Geolocation API does not work on Motorola Xoom tablet (and perhaps/probably other devices)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 2.3.0, 2.4.0, 2.5.0
    • None
    • cordova-android
    • Mac OS X 10.8.3, Eclipse 4.2.1, Cordova 2.5.0, Motorola Xoom tablet running Android v4.1.2

    Description

      In a nutshell: the Geolocation API does not work on the Xoom tablet. The "success" callback never gets called after getCurrentPosition() or watchPosition().

      More details... Neither the:

      • navigator.geolocation.getCurrentPosition(onSuccess, onError, { maximumAge: 2000, timeout: 5000, enableHighAccuracy: true }

        ) nor

      • navigator.geolocation.watchPosition(onSuccess, onError, { maximumAge: 2000, timeout: 5000, enableHighAccuracy: true }

        )

      methods result in the "onSuccess" callback being called.

      Without the optional options ("

      { maximumAge: 2000, timeout: 5000, enableHighAccuracy: true }

      ") included in the methods, the "onError" callback never (unless the default timeout is several minutes, if there is a default) gets called either. With the options included, it does, and the timeout error (error.message = "Timeout expired") is generated. Only the onError callback gets called, never the onSuccess callback, when running on the Xoom.

      Tested on other devices (Droid3 and iPhone) and these methods work (though watchPosition is slow on Droid3, another bug). Manifest and inspection of permissions look correct. Xoom is able to show its location using other apps like Google Maps.

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            jackp@uic.edu Jack Piccininni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: