[ https://issues.apache.org/jira/browse/CB-13385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16259373#comment-16259373 ]
Thilo Ratnaweera commented on CB-13385: --------------------------------------- It may also have to do with changes documented in this [blog post|https://developer.android.com/about/versions/oreo/background-location-limits.html]. That your phone sent the new location in the morning, may have had to do with the limit which is not strict but reduced to "_a few times each hour_". > Geolocation doesn't work on Android 8.0 (Oreo) > ---------------------------------------------- > > Key: CB-13385 > URL: https://issues.apache.org/jira/browse/CB-13385 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-plugin-geolocation > Reporter: Gianfranco Palumbo > Labels: android8.0 > > With a Google LG Nexus 5X and I can't manage to make {{getCurrentPosition()}} > work. > I have Wi-Fi on, Location on high accuracy, Mobile data on, even Bluetooth > on, but nothing. > You can replicate by running this code in the Chrome Dev console (via Remote > devices): > {code:javascript} > var geoOptions = { > timeout: 10 * 1000 > } > var geoSuccess = function(position) { > alert('Success! Lat: ' + position.coords.latitude + ' . Long: ' + > position.coords.longitude); > }; > var geoError = function(error) { > alert('Error occurred. Error code: ' + error.code); > // error.code can be: > // 0: unknown error > // 1: permission denied > // 2: position unavailable (error response from location provider) > // 3: timed out > }; > navigator.geolocation.getCurrentPosition(geoSuccess, geoError, geoOptions); > {code} > I also managed to reproduce with a cordova plugin and ionic native showcase > app: > # > https://play.google.com/store/apps/details?id=br.com.marcioggs.cordovashowcase&rdid=br.com.marcioggs.cordovashowcase > # > https://play.google.com/store/apps/details?id=com.ionichelper.ionic2native&rdid=com.ionichelper.ionic2native > (though no error appears) > Code the 1st app is here: > https://github.com/michaelrbk/showCaseCordova/blob/master/www/js/geolocation.js > Trying a phone with Android 6 is fine. > Could this be related to this? > https://developer.android.com/about/versions/oreo/background-location-limits.html -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org