Ionic 3 geolocation is not working

I’m trying to get my current location from geolocation. But the geolocation.getCurrentPosition().then() is not getting called.

My ioinc version is 3
@ionic-native/geolocation": “^4.20.0”

1.Call this when platform is ready
2.Check that plugin you are using is stable version
3.If possible use one version down of plugin.

that didnt work for me.

So in my case, the problem was a version issue. When i imported the geolocation, i have imported incorrectly. Since i’m using ionic 3, i should import it without “/ngx”. Thats how i solved my issue.