# @ionic-native/geolocation issue

**URL:** <https://forum.ionicframework.com/t/ionic-native-geolocation-issue/100953>\
**Category:** Ionic Native\
**Created:** [August 5, 2017, 11:03am UTC](https://forum.ionicframework.com/t/ionic-native-geolocation-issue/100953 "2017-08-05T11:03:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnswico](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cnswico/32/111340_2.png) [@cnswico](https://forum.ionicframework.com/u/cnswico)\
**Post date:** [August 5, 2017, 11:03am UTC](https://forum.ionicframework.com/t/ionic-native-geolocation-issue/100953/1 "2017-08-05T11:03:58Z")

</div>

I have an Ionic 3.7.0 project. As I needed to implement a GPS feature, I installed `cordova-plugin-geoloaction` and `@ionic-native/geolocation`. I added it as on of my providers and included it to the page where I needed it.

**geo-page.ts**

```auto
if (this.platform.is('cordova')) {
      this.gps.getCurrentPosition().then(data => {
        this.location.lat = data.coords.latitude;
        this.location.lng = data.coords.longitude;

        console.log('[DEBUG] Location: ' + JSON.stringify(this.location));
      }, error => {
        console.log('[DEBUG] Promise Rejected. ' + JSON.stringify(error));
      }).catch(error => {
        console.log('[DEBUG] Promise Unfulfilled. ' + JSON.stringify(error));
      });

    [...]      

    }

```

**This is what was output in the `LogCat`:**

```nohighlight
08-05 18:44:04.807 I/chromium(11230): [INFO:CONSOLE(121)] "[DEBUG] Promise Unfulfilled. {" __zone_symbol__ currentTask":{"type":"microTask","state":"notScheduled","source":"Promise.then","zone":"angular","cancelFn":null,"runCount":0}}", source: file:///android_asset/www/build/1.js (121)

```

**Here’s the expanded JSON for ease…**

```json
{
   " __zone_symbol__ currentTask":
      {
         "type":"microTask",
         "state":"notScheduled",
         "source":"Promise.then",
         "zone":"angular",
         "cancelFn":null,
         "runCount":0
      }
}

```

**Ionic info**

```nohighlight
$ ionic info                                   
                                               
cli packages: (C:\ionic\node_modules)          
                                               
    @ionic/cli-plugin-cordova : 1.6.2    
    @ionic/cli-plugin-ionic-angular : 1.4.1    
    @ionic/cli-utils : 1.7.0    
    ionic (Ionic CLI) : 3.7.0    
                                               
global packages:                               
                                               
    Cordova CLI : 7.0.1                        
                                               
local packages:                                
                                               
    @ionic/app-scripts : 2.1.3                 
    Cordova Platforms : android 6.2.3         
    Ionic Framework : ionic-angular 3.4.0   
                                               
System:                                        
                                               
    Android SDK Tools : 26.0.1                 
    Node : v6.11.2                
    OS : Windows 10             
    npm : 3.10.10                

```

I have absolutely no idea what’s going on. I followed the [instructions](https://ionicframework.com/docs/native/geolocation/) and it just doesn’t seem to be working.

---

<div class="post-metadata">

**Author:** ![shivani8710](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/shivani8710/32/112070_2.png) [@shivani8710](https://forum.ionicframework.com/u/shivani8710)\
**Post date:** [August 5, 2017, 1:03pm UTC](https://forum.ionicframework.com/t/ionic-native-geolocation-issue/100953/2 "2017-08-05T13:03:58Z")

</div>

I have same problem also…I got latitude and longitude in but only in browser and in motorola android phone…it other device it is not working…So I want help for it
