Problems using current position from Geolocation


My problem is related to the use of the cordova geolocation in ionic-native. I’m not able to get the gps location successfully neither AVD nor in a device. I’am using Diagnostic and Geolocation plugins (they are added to the project and it should work ok)

some code below:

this.platform.ready().then(() => {
	Diagnostic.isGpsLocationEnabled().then( (gpsLocationEnabled)=>{
			Diagnostic.isGpsLocationAvailable().then ( (gpsLocationAvailable)=>{
					var options = {
						enableHighAccuracy : true,
						timeout : 5000,
						maximumAge : 0
					Geolocation.getCurrentPosition(options).then((position) => {
						this.position = position;
			}).catch( (error) => {

In my last approach I added the options variable but the error I get is a timeout error. I tryed to increase but still getting this error. I think the plugin can’t get the position from the device.

The conditionals are working ok. If the GPS button is swiched off the corresponding alert is shown and so on. So, anybody knows what could happen here?

I deploy the app using ‘’‘ionic build android’’’

Best regards


This syntax leads me to believe you’re still using ionic-native v2. I would suggest moving to ionic-native v3. In addition to many bug fixes that may address your issue, it will significantly decrease your app binary size.