Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C08D109E8 for ; Sat, 24 Oct 2015 21:53:28 +0000 (UTC) Received: (qmail 38616 invoked by uid 500); 24 Oct 2015 21:53:27 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 38589 invoked by uid 500); 24 Oct 2015 21:53:27 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 38573 invoked by uid 99); 24 Oct 2015 21:53:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2015 21:53:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A4B602C044E for ; Sat, 24 Oct 2015 21:53:27 +0000 (UTC) Date: Sat, 24 Oct 2015 21:53:27 +0000 (UTC) From: "Marian Hello (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-9862) getCurrentAcceleration not working after clearWatch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Marian Hello created CB-9862: -------------------------------- Summary: getCurrentAcceleration not working after clearWatch Key: CB-9862 URL: https://issues.apache.org/jira/browse/CB-9862 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 1.1.0 Reporter: Marian Hello After navigator.accelerometer.clearWatch method call navigator.accelerometer.getCurrentAcceleration is not calling callbacks. How to reproduce: onDeviceReady: function() { var watchID; var options = { frequency: 3000 }; // Update every 3 seconds function onSuccess(acceleration) { navigator.accelerometer.getCurrentAcceleration(onCurrent, onError); navigator.accelerometer.clearWatch(watchID); setTimeout(start, 1000); } function onCurrent(acceleration) { alert('Acceleration X: ' + acceleration.x + '\n' + 'Acceleration Y: ' + acceleration.y + '\n' + 'Acceleration Z: ' + acceleration.z + '\n' + 'Timestamp: ' + acceleration.timestamp + '\n'); } function onError() { alert('onError!'); } function start() { watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options); } start(); }, -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org