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

Native geolocation doesn't work anymore from 1.5.0 version

    XMLWordPrintableJSON

    Details

      Description

      Hi guys, im not uderstand why native getCurrentPosition stop working from 1.5.0 version of phonegap ... probably you are making test with html5 built-in getCurrentPosition in OS6+ ?? ... its a really huge mistake take a look ...

      the interfaces definitions / action names (and arguments too)...

      Phonegap 2.7:

      javascript:

      exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]);
      

      java:

      protected static int getAction(String action) {
        if ("watchPosition".equals(action)) return ACTION_WATCH;
        if ("stop".equals(action)) return ACTION_CLEAR_WATCH;
        if ("getCurrentPosition".equals(action)) return ACTION_GET_POSITION;
        if ("shutdown".endsWith(action)) return ACTION_SHUTDOWN;
        return -1;
      }
      

      of course ... it never match the action specified ...

      but in Phonegap 1.5.0:

      javascript:

      Cordova.exec(null, errorCallback, "Geolocation", "getCurrentPosition", [id, maximumAge, timeout, enableHighAccuracy]);
      

      java:

      protected static int getAction(String action) {
        if ("watchPosition".equals(action)) return ACTION_WATCH;
        if ("stop".equals(action)) return ACTION_CLEAR_WATCH;
        if ("getCurrentPosition".equals(action)) return ACTION_GET_POSITION;
        if ("shutdown".endsWith(action)) return ACTION_SHUTDOWN;
        return -1;
      }
      

      it will be great to fix it soon ...

      thks !

        Attachments

          Activity

            People

            • Assignee:
              lorin.beer Lorin Beer
              Reporter:
              afalduto Ariel Falduto
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: