You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Grebnov (JIRA)" <ji...@apache.org> on 2015/12/29 06:44:49 UTC
[jira] [Commented] (CB-8443) nothing happens if GPS is not allowed
by the app...
[ https://issues.apache.org/jira/browse/CB-8443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15073520#comment-15073520 ]
Sergey Grebnov commented on CB-8443:
------------------------------------
Confirm that the following code w/o additional Position args does not call any callback (I've been waiting a few minutes)
{code}
var onSuccess = function(position) {
alert('Latitude: ' + position.coords.latitude + '\n' +
'Longitude: ' + position.coords.longitude + '\n' +
'Altitude: ' + position.coords.altitude + '\n' +
'Accuracy: ' + position.coords.accuracy + '\n' +
'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' +
'Heading: ' + position.coords.heading + '\n' +
'Speed: ' + position.coords.speed + '\n' +
'Timestamp: ' + position.timestamp + '\n');
};
// onError Callback receives a PositionError object
//
function onError(error) {
alert('code: ' + error.code + '\n' +
'message: ' + error.message + '\n');
}
navigator.geolocation.getCurrentPosition(onSuccess, onError);
{code}
> nothing happens if GPS is not allowed by the app...
> ---------------------------------------------------
>
> Key: CB-8443
> URL: https://issues.apache.org/jira/browse/CB-8443
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Geolocation
> Affects Versions: 3.5.0
> Environment: moto G android 4.4.4
> Reporter: clement bidon
> Labels: android, triaged
>
> to goe the error: disable "ALL LOCATION SERVICE" on the phone.
> call "getCurrentPosition" or "watchPosition" functions without any timout.
> The "onError" function should be called with "PositionError.PERMISSION_DENIED" or with "PositionError.POSITION_UNAVAILABLE", BUT IT S NOT THE CASE: --> nothing happens.
--
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