You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Drew Walters (JIRA)" <ji...@apache.org> on 2012/07/18 20:27:34 UTC

[jira] [Resolved] (CB-1090) Remove listener before invoking callback for accelerometer

     [ https://issues.apache.org/jira/browse/CB-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Drew Walters resolved CB-1090.
------------------------------

    Resolution: Fixed
    
> Remove listener before invoking callback for accelerometer
> ----------------------------------------------------------
>
>                 Key: CB-1090
>                 URL: https://issues.apache.org/jira/browse/CB-1090
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.0.0
>            Reporter: Drew Walters
>            Assignee: Drew Walters
>             Fix For: 2.0.0
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira