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

Not able to get geolocation from nav

Javi_G_
初學者
815 檢視

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 積分
1 解決方案
Anthony_H_Intel
815 檢視

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

 


 

 

在原始文章中檢視解決方案

2 回應
Anthony_H_Intel
816 檢視

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

 


 

 

Javi_G_
初學者
815 檢視

Thank you so much!

 

回覆