You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/08/21 05:23:37 UTC

[GitHub] llinaresvicent edited a comment on issue #110: Timeout exception Android 9

llinaresvicent edited a comment on issue #110: Timeout exception Android 9
URL: https://github.com/apache/cordova-plugin-geolocation/issues/110#issuecomment-414553335
 
 
   I made a little app just for testing that problem. With the version 2.4.3 I get timeout exception on android 8 but works fine on android 6. The function:
   `
       getCurrentPosition() {
   		return new Promise(function (resolve, reject) {
   			function onSuccess(position) {
   				alert('latitud : ' + position.coords.latitude);
   				alert('longitud : ' + position.coords.longitude);
   				resolve([position.coords.latitude, position.coords.longitude]);
   			};
   			function onError(error) {
   				alert('Error getCurrentPosition : ' +
   					'code: ' + error.code + '\n' +
   					'message: ' + error.message + '\n');
   				reject("KO");
   			};
   			navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 30000 });
   		});
   
   	}
   ` 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org