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

Remove listener before invoking callback for accelerometer

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment