Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Javi_G_
Beginner
51 Views

Not able to get geolocation from nav

Jump to solution

Hi everyone!

I'm new in this world and I'm facing my first big issue :(

I have created an app from a web with XDK.

It's a simple html with a:

window.location.href

Everything is working fine except one thing.

On the web page, I get the geolocation from the nav with no problems.

However in both apps (iOS and Android) I'm unable to get it.

I wonder if there is a solution apart from installing a GPS plugin.

Thank you a lot :)

I'm learning and enjoying a lot!

Take care!

 

Tags (2)
0 Kudos
1 Solution
Anthony_H_Intel
Employee
51 Views

Hi Javi-

One of the things that the Cordova Geolocation plugin does is to enable required security permissions related to obtaining the location of the device.  Desktop web browsers do this a little differently - they usually just ask the user if it is ok to share the location with the app, but mobile apps have to include a declaration stating that they will try to obtain location information.  On Android, this type of declaration is called a permission (read more about Android Permissions here).

Here is a short article that shows how to use Intel XDK and the Cordova Geolocation plugin to write a mobile app that can obtain and display the current location of the device.

Tony

 


 

 

View solution in original post

2 Replies
Anthony_H_Intel
Employee
52 Views

Hi Javi-

One of the things that the Cordova Geolocation plugin does is to enable required security permissions related to obtaining the location of the device.  Desktop web browsers do this a little differently - they usually just ask the user if it is ok to share the location with the app, but mobile apps have to include a declaration stating that they will try to obtain location information.  On Android, this type of declaration is called a permission (read more about Android Permissions here).

Here is a short article that shows how to use Intel XDK and the Cordova Geolocation plugin to write a mobile app that can obtain and display the current location of the device.

Tony

 


 

 

View solution in original post

Javi_G_
Beginner
51 Views

Thank you so much!

 

Reply