Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
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 !