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 ADFF910D97 for ; Thu, 20 Mar 2014 21:25:46 +0000 (UTC) Received: (qmail 39689 invoked by uid 500); 20 Mar 2014 21:25:45 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 39658 invoked by uid 500); 20 Mar 2014 21:25:44 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 39624 invoked by uid 99); 20 Mar 2014 21:25:44 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2014 21:25:44 +0000 Date: Thu, 20 Mar 2014 21:25:44 +0000 (UTC) From: "Joe Bowser (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6078) Geolocation watchPosition consistently timing out on Android 4.0.4 with Cordova 3.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942303#comment-13942303 ] Joe Bowser commented on CB-6078: -------------------------------- Are you using the latest plugin, which adds the permissions for Geolocation? If not, you should be using that. Also, you have to make sure you're not in any energy saving mode. What device is still on Android 4.0.4 that you're testing on? The Motorola RAZR? > Geolocation watchPosition consistently timing out on Android 4.0.4 with Cordova 3.3.0 > ------------------------------------------------------------------------------------- > > Key: CB-6078 > URL: https://issues.apache.org/jira/browse/CB-6078 > Project: Apache Cordova > Issue Type: Bug > Components: Android, CordovaJS > Affects Versions: 3.3.0 > Reporter: Clay Benoit > > I am unable to get watchPosition to return more than one position using v3.3.0 on Android 4.0.4 and Android 4.4.0. I have tried various combinations of timeout, maximumAge and enableHighAccuracy and the results are all the same. That is, I get the first position and then a timeout. I never see the position change even if the device is moving. On iOS, my scaled down sample updates with minor movements of the device. Here is the JavaScript I'm using: > var _options = { > maximumAge: 0, > timeout: 60000, > enableHighAccuracy: true > }; > // Wait for Cordova to load > // > document.addEventListener("deviceready", onDeviceReady, false); > // Cordova is ready > // > function onDeviceReady() { > navigator.geolocation.watchPosition(onSuccess, onError, _options); > } > // onSuccess Geolocation > // > function onSuccess(position) { > var info = 'Latitude: ' + position.coords.latitude + '
' + > 'Longitude: ' + position.coords.longitude + '
' + > 'Altitude: ' + position.coords.altitude + '
' + > 'Accuracy: ' + position.coords.accuracy + '
' + > 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '
' + > 'Heading: ' + position.coords.heading + '
' + > 'Speed: ' + position.coords.speed + '
' + > 'Timestamp: ' + > position.timestamp + '
'; > $("#results").html(info); > console.log(info) > } > // onError Callback receives a PositionError object > // > function onError(error) { > alert('code: ' + error.code + '\n' + > 'message: ' + error.message + '\n'); > } -- This message was sent by Atlassian JIRA (v6.2#6252)