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

Remove listener before invoking callback for accelerometer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • cordova-js
    • None

    Description

      The getCurrentAcceleration() code currently invokes the success or fail callbacks prior to clearing the listener. If the invoked success or fail callbacks take a long time it can result in them being invoked multiple times since the accelerometer continues to report data until the listener is removed.

      Quick fix is to clear the listener prior to invoking the callbacks.

      Attachments

        Activity

          People

            deedubbu Drew Walters
            deedubbu Drew Walters
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: