Software Archive
Read-only legacy content

Intel XDK Cordova geolocation issue

Rares_H_
Beginner
587 Views

Hello fellow developers,

I am having a bit of an issue with the cordova geolocation plugin.

I am trying to get my position with the geolocation plugin but if the GPS Location is turned off before i open the app, i can prompt the message to ask the user to turn it on ( not like other native apps, just a simple notice ) but until he restarts the app, the location is not triggered.

Is there a way to fix this ?

If the location is turned on before the app launches everything works ok until it is turned off while the app is running, if it is turned off and then back on, it stops working again.

I am hoping there is a way for force start the location GPS on the device while the app is running without having to restart the app.

The tests were on  Android 5.1.1 / Sony Xperia Z3 Compact

Thank you!

0 Kudos
3 Replies
Rares_H_
Beginner
587 Views

Just found this sample : https://github.com/xmnboy/hello-cordova

it seems to work as i desire, so i will start debugging and comparing with what i have.

Hope that sample helps anybody else.

0 Kudos
Dani_Carla
Beginner
587 Views

Hi Rares H.

I'm with the same problem.
You find a solution?

0 Kudos
Rares_H_
Beginner
587 Views

Hey Carla,

I scraped the HelloCordova APP and made it work with my conditions

https://github.com/xmnboy/hello-cordova

Remove from cordova-geo.js what you don't need and it should work.

I included the utils , cordova-geo and the triggers in my own init-app.js

 

Best of luck.

0 Kudos
Reply