Apache Cordova
  1. Apache Cordova
  2. CB-411

Accelerometer API does not hide implementation differences between the platforms (iPhone / Android)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.6.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      iPhone 4.3
      Android 2.3

      Description

      The accelerometer API on the iPhone reports values in units of 1G, while Android uses the metres per second squared unit. PhoneGap should convert the values to a standard format before reporting it to the API users.

        Activity

        Hide
        Filip Maj added a comment -

        Certainly will do. It's on my todo list

        I will file separate issues tagged for docs shortly! Keep an eye out for those.

        Show
        Filip Maj added a comment - Certainly will do. It's on my todo list I will file separate issues tagged for docs shortly! Keep an eye out for those.
        Hide
        DI Florian Hackenberger added a comment -

        Great, thanks for that information! Could you please add a note to the API docs on http://docs.phonegap.com/en/1.5.0/phonegap_accelerometer_accelerometer.md.html that before 1.5 (and 1.6.0rc1 on iPhone) the values were platform specific?

        Show
        DI Florian Hackenberger added a comment - Great, thanks for that information! Could you please add a note to the API docs on http://docs.phonegap.com/en/1.5.0/phonegap_accelerometer_accelerometer.md.html that before 1.5 (and 1.6.0rc1 on iPhone) the values were platform specific?
        Hide
        Filip Maj added a comment -

        The accelerometer APIs on Android and iOS were standardized to return values in m/s^2 via the unified JS project (cordova-js).

        Android has been using cordova-js since 1.5, and iOS since 1.6.0rc1.

        This will land in 1.6.0.

        Show
        Filip Maj added a comment - The accelerometer APIs on Android and iOS were standardized to return values in m/s^2 via the unified JS project (cordova-js). Android has been using cordova-js since 1.5, and iOS since 1.6.0rc1. This will land in 1.6.0.

          People

          • Assignee:
            Shazron Abdullah
            Reporter:
            DI Florian Hackenberger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development