You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Gianfranco Palumbo (JIRA)" <ji...@apache.org> on 2017/10/04 19:42:00 UTC

[jira] [Closed] (CB-13385) Geolocation doesn't work on Android 8.0 (Oreo)

     [ https://issues.apache.org/jira/browse/CB-13385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gianfranco Palumbo closed CB-13385.
-----------------------------------
    Resolution: Cannot Reproduce

I don't know what was the issue, but in the morning my phone's location started to work :/
Could be the phone hearing that the new Pixel phone is coming out :D

> 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-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org