Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

Not able to get geolocation from nav

Javi_G_
Beginner
807 Views

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!

 

0 Kudos
1 Solution
Anthony_H_Intel
Employee
807 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

0 Kudos
2 Replies
Anthony_H_Intel
Employee
808 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

 


 

 

0 Kudos
Javi_G_
Beginner
807 Views

Thank you so much!

 

0 Kudos
Reply