You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2017/01/03 19:17:58 UTC

[jira] [Resolved] (CB-12301) Cordova geolocation plugin issue

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

Joe Bowser resolved CB-12301.
-----------------------------
    Resolution: Won't Fix

Depending on the version of Android and the WebView used, Cordova either uses Chrome's GPS or Android WebView's GPS.  The plugin code only manages permissions to use the phone's location services.  Because of this, there's not much that can be done about this issue.

If you're running Android 7.0, simply update Chrome.
If you're running Android 5 or higher, try updating Android System WebView.
If you're running Android 4.4 or lower, consider using Crosswalk and seeing that resolves your issue.



> Cordova geolocation plugin issue
> --------------------------------
>
>                 Key: CB-12301
>                 URL: https://issues.apache.org/jira/browse/CB-12301
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 6.4.0
>         Environment: Android
>            Reporter: Abhishek Kumar
>
> Cordova geolocation plugin works only with phone's GPS location. If phone GPS is not locked (e.g. being inside the building), then it should take the COARSE_LOCATION i.e. WIFI or Cellular tower.  I checked it by providing it only the permission of only ACCESS_COARSE_LOCATION and commenting out the code for ACCESS_FINE_LOCATION. We get error code: 3 (timeout) in this case.
>  $scope.showpopup=function(status){
>                  console.log("show pop up function called");
>                  var cont;
>                  switch (status) {
>                     case 1:
>                         cont = "User denied the request for Geolocation."
>                         break;
>                     case 2:
>                         cont = "Location information is unavailable."
>                         break;
>                     case 3:
>                         cont = "The request to get user location timed out."
>                         break;
>                     default:
>                         cont = "An unknown error occurred."
>                         break;
>                 }
>                 $ionicPopup.alert({
>                     title: 'Gps error',
>                     content: cont
>                 });
>         };
>  navigator.geolocation.getCurrentPosition(
>     function(position){
>         //Variables to use for showing latitude and longitude by position.coords .
>     },function(error){
>         $scope.showpopup(error.code);
>           },{timeout:10000,maximumAge:60000,enableHighAccuracy:true});



--
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