Apache Cordova
  1. Apache Cordova
  2. CB-359

Update geolocation plugin to adhere to W3C specification

    Details

    • Type: Test Test
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: CordovaJS
    • Labels:
      None

      Description

      Need to check that our geo implementations follow the W3C Geolocation Spec.

      Looks like the old/stock implementation (unused impl. on Android and current one on iOS) are just plain wrong.

      First, add tests to mobile-spec and to cordova-js (done).

      Then, implement new requirements imposed on native from cordova-js in the various native platforms. iOS most important here as is the main platform that utilizes our implementation.

      After that is done, we need to test across all of the cordova platforms.

      Finally, once over the documentation.

        Issue Links

          Activity

          Filip Maj created issue -
          Hide
          Filip Maj added a comment -

          test on all tagged platforms plz

          Show
          Filip Maj added a comment - test on all tagged platforms plz
          Filip Maj made changes -
          Field Original Value New Value
          Component/s Android [ 12316401 ]
          Component/s Bada [ 12316405 ]
          Component/s BlackBerry [ 12316402 ]
          Component/s CordovaJS [ 12317202 ]
          Component/s iOS [ 12316400 ]
          Component/s Qt [ 12317403 ]
          Component/s webOS [ 12317201 ]
          Component/s WP7 [ 12316404 ]
          Filip Maj made changes -
          Assignee Filip Maj [ filmaj ]
          Filip Maj made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Filip Maj added a comment -

          Untagging platforms for now. First tests need to land in mobile-spec + cordova-js.

          Show
          Filip Maj added a comment - Untagging platforms for now. First tests need to land in mobile-spec + cordova-js.
          Filip Maj made changes -
          Description Need to check that we are returning the right error codes and exhibiting correct behaviour as per the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          First, add tests to mobile-spec and to cordova-js.

          After that is done, we need to test across all of the cordova platforms.
          Component/s iOS [ 12316400 ]
          Component/s Android [ 12316401 ]
          Component/s BlackBerry [ 12316402 ]
          Component/s WP7 [ 12316404 ]
          Component/s Bada [ 12316405 ]
          Component/s webOS [ 12317201 ]
          Component/s Qt [ 12317403 ]
          Hide
          Filip Maj added a comment -

          I am prototyping the unit tests for the JS (and slowly adding implementation bits) on a branch on my fork here: https://github.com/filmaj/incubator-cordova-js/tree/geotests

          Show
          Filip Maj added a comment - I am prototyping the unit tests for the JS (and slowly adding implementation bits) on a branch on my fork here: https://github.com/filmaj/incubator-cordova-js/tree/geotests
          Hide
          Filip Maj added a comment -

          Generalized the ticket a bit.

          Show
          Filip Maj added a comment - Generalized the ticket a bit.
          Filip Maj made changes -
          Summary Add mobile spec tests for checking geolocation error return values Add mobile spec and cordova-js tests for Geolocation module
          Description Need to check that we are returning the right error codes and exhibiting correct behaviour as per the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          First, add tests to mobile-spec and to cordova-js.

          After that is done, we need to test across all of the cordova platforms.
          Need to check that our geo implementations follow the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          Looks like the old/stock implementation (unused impl. on Android and current one on iOS) are just plain wrong.

          First, add tests to mobile-spec and to cordova-js.

          Then, implement new requirements imposed on native from cordova-js in the various native platforms. iOS most important here as is the main platform that utilizes our implementation.

          After that is done, we need to test across all of the cordova platforms.
          Hide
          Filip Maj added a comment -

          Reminder for updating docs.

          Show
          Filip Maj added a comment - Reminder for updating docs.
          Filip Maj made changes -
          Description Need to check that our geo implementations follow the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          Looks like the old/stock implementation (unused impl. on Android and current one on iOS) are just plain wrong.

          First, add tests to mobile-spec and to cordova-js.

          Then, implement new requirements imposed on native from cordova-js in the various native platforms. iOS most important here as is the main platform that utilizes our implementation.

          After that is done, we need to test across all of the cordova platforms.
          Need to check that our geo implementations follow the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          Looks like the old/stock implementation (unused impl. on Android and current one on iOS) are just plain wrong.

          First, add tests to mobile-spec and to cordova-js.

          Then, implement new requirements imposed on native from cordova-js in the various native platforms. iOS most important here as is the main platform that utilizes our implementation.

          After that is done, we need to test across all of the cordova platforms.

          Finally, once over the documentation.
          Hide
          Filip Maj added a comment -

          Probably won't make it in for 1.6!

          Show
          Filip Maj added a comment - Probably won't make it in for 1.6!
          Filip Maj made changes -
          Fix Version/s 1.7.0 [ 12319549 ]
          Fix Version/s 1.6.0 [ 12319548 ]
          Hide
          Filip Maj added a comment -

          Added test to mobile spec in 5f7ff8a.

          Show
          Filip Maj added a comment - Added test to mobile spec in 5f7ff8a .
          Filip Maj made changes -
          Component/s mobile-spec [ 12317700 ]
          Hide
          Filip Maj added a comment -

          JavaScript + mobile-spec tests exist. Next step is updating the native framework to conform to the API differences imposed by exec calls for Android, webOS and iOS. The following is something I wrote up for the cordova mailing list which describes the API changes enforced by exec and what actions the native framework should implement, along with what parameters are provided.

          All of this means the the API on the native side for geolocation will change (sorry iOS!). Basically we have three actions that the Geolocation plugin should listen for:

          • getLocation, which takes as parameters enableHighAccuracy (boolean) and maximumAge (int as milliseconds).
          • addWatch, parameter: only the usual callbackID required.
          • clearWatch, parameter: only the usual callbackID required.

          getLocation should require very little changing (other than not needing the timeout parameter anymore, since that is handled on the JS side in my patch).

          addWatch should keep a list of callback Ids, and, as soon as we have one watch started, the native framework should start watching the position for a "significant position difference". Once that happens, it should fire the success callback(s) for all stored watch callback Ids. If there is an issue retrieving position, it should fire the error callback(s) for all stored watch callback Ids.

          Show
          Filip Maj added a comment - JavaScript + mobile-spec tests exist. Next step is updating the native framework to conform to the API differences imposed by exec calls for Android, webOS and iOS. The following is something I wrote up for the cordova mailing list which describes the API changes enforced by exec and what actions the native framework should implement, along with what parameters are provided. All of this means the the API on the native side for geolocation will change (sorry iOS!). Basically we have three actions that the Geolocation plugin should listen for: getLocation, which takes as parameters enableHighAccuracy (boolean) and maximumAge (int as milliseconds). addWatch, parameter: only the usual callbackID required. clearWatch, parameter: only the usual callbackID required. getLocation should require very little changing (other than not needing the timeout parameter anymore, since that is handled on the JS side in my patch). addWatch should keep a list of callback Ids, and, as soon as we have one watch started, the native framework should start watching the position for a "significant position difference". Once that happens, it should fire the success callback(s) for all stored watch callback Ids. If there is an issue retrieving position, it should fire the error callback(s) for all stored watch callback Ids.
          Filip Maj made changes -
          Component/s Android [ 12316401 ]
          Component/s iOS [ 12316400 ]
          Component/s webOS [ 12317201 ]
          Component/s CordovaJS [ 12317202 ]
          Hide
          Filip Maj added a comment -

          I have a branch for the necessary changes for the native side for iOS set up. Pending reviews from a few other iOS folk, iOS should be done for this shortly.

          Show
          Filip Maj added a comment - I have a branch for the necessary changes for the native side for iOS set up. Pending reviews from a few other iOS folk, iOS should be done for this shortly.
          Hide
          Filip Maj added a comment -

          Tagged remaining components. WP7, Bada and webOS need their native bits lined up. Once those are complete finish off with polishing the docs for geo.

          Show
          Filip Maj added a comment - Tagged remaining components. WP7, Bada and webOS need their native bits lined up. Once those are complete finish off with polishing the docs for geo.
          Filip Maj made changes -
          Description Need to check that our geo implementations follow the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          Looks like the old/stock implementation (unused impl. on Android and current one on iOS) are just plain wrong.

          First, add tests to mobile-spec and to cordova-js.

          Then, implement new requirements imposed on native from cordova-js in the various native platforms. iOS most important here as is the main platform that utilizes our implementation.

          After that is done, we need to test across all of the cordova platforms.

          Finally, once over the documentation.
          Need to check that our geo implementations follow the [W3C Geolocation Spec|http://dev.w3.org/geo/api/spec-source.html#api_description].

          Looks like the old/stock implementation (unused impl. on Android and current one on iOS) are just plain wrong.

          First, add tests to mobile-spec and to cordova-js (done).

          Then, implement new requirements imposed on native from cordova-js in the various native platforms. iOS most important here as is the main platform that utilizes our implementation.

          After that is done, we need to test across all of the cordova platforms.

          Finally, once over the documentation.
          Component/s Bada [ 12316405 ]
          Component/s Docs [ 12316407 ]
          Component/s WP7 [ 12316404 ]
          Component/s iOS [ 12316400 ]
          Component/s Android [ 12316401 ]
          Hide
          Filip Maj added a comment -

          Updated title to more accurately represent the issue

          Show
          Filip Maj added a comment - Updated title to more accurately represent the issue
          Filip Maj made changes -
          Summary Add mobile spec and cordova-js tests for Geolocation module Update geolocation plugin to adhere to W3C specification
          Shazron Abdullah made changes -
          Link This issue blocks CB-509 [ CB-509 ]
          Hide
          Filip Maj added a comment -

          Moving to 1.8; 1.7 will be bug fixes + docs only.

          Show
          Filip Maj added a comment - Moving to 1.8; 1.7 will be bug fixes + docs only.
          Filip Maj made changes -
          Fix Version/s 1.8.0 [ 12319550 ]
          Fix Version/s 1.7.0 [ 12319549 ]
          Shazron Abdullah made changes -
          Link This issue blocks CB-509 [ CB-509 ]
          Shazron Abdullah made changes -
          Link This issue blocks CB-64 [ CB-64 ]
          Shazron Abdullah made changes -
          Link This issue blocks CB-55 [ CB-55 ]
          Shazron Abdullah made changes -
          Link This issue blocks CB-95 [ CB-95 ]
          Hide
          Filip Maj added a comment -

          Cordova-js changes have been merged in.

          Will be working towards merging the native updates into the platform implementations.

          Show
          Filip Maj added a comment - Cordova-js changes have been merged in . Will be working towards merging the native updates into the platform implementations.
          Hide
          Filip Maj added a comment -

          Tagging as cordova-js, will set up native bits as separate sub-tasks.

          Show
          Filip Maj added a comment - Tagging as cordova-js, will set up native bits as separate sub-tasks.
          Filip Maj made changes -
          Component/s CordovaJS [ 12317202 ]
          Component/s WP7 [ 12316404 ]
          Component/s Bada [ 12316405 ]
          Component/s Docs [ 12316407 ]
          Component/s webOS [ 12317201 ]
          Hide
          Filip Maj added a comment -

          Done, yus!

          Show
          Filip Maj added a comment - Done, yus!
          Filip Maj made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Gavin made changes -
          Link This issue blocks CB-64 [ CB-64 ]
          Gavin made changes -
          Link This issue is depended upon by CB-64 [ CB-64 ]
          Gavin made changes -
          Link This issue blocks CB-55 [ CB-55 ]
          Gavin made changes -
          Link This issue is depended upon by CB-55 [ CB-55 ]
          Gavin made changes -
          Link This issue blocks CB-95 [ CB-95 ]
          Gavin made changes -
          Link This issue is depended upon by CB-95 [ CB-95 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          22h 11m 1 Filip Maj 21/Mar/12 19:28
          In Progress In Progress Resolved Resolved
          48d 1h 27m 1 Filip Maj 08/May/12 20:56

            People

            • Assignee:
              Filip Maj
              Reporter:
              Filip Maj
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development