NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on October 30, 2020, 07:25:04 AM
-
Hi, Im using p_web.GetLocation() and it works ok in a PC web browser but when I try it in my android phone it does not work.
Im always getting a blanck latitud and longitude
Permissions in android for google is ok.
but Im getting:
GET /SetSessionValue?_LocationError_=1_permission_denied&_ajax_=1
Any hint?
Thanks
-
Permission Denied means that the permission is, um, well, denied.
Perhaps because the site is not HTTPS? Or because the user did not allow the location to be shared.
cheers
Bruce
-
jeje, OK
Yes its not https, but it works ok on chome localhost and do not on chrome android
-
Chrome makes some security exceptions for locahost.
That's why it works on your machine where you're accessing localhost.
And doesn't on your android that isn't accessing localhost.
https://chromium.googlesource.com/chromium/src/+/master/docs/security/faq.md#Which-origins-are-secure
one option:
https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server
or install a recognized certificate on your local server and switch to https.
Jane
-
I have a problem with p_web.GetLocation (), I don't know which version of NT broke my code in the past? My site https://fecipur.org/LoginForm was working, my code is in a Procedure Setup and try in different procedure but don't work
p_web.GetLocation ()
GLO: Latitude = CLIP (p_web.GetSessionValue ('_ Latitude_'))
p_web.SetSessionValue ('GLO: Latitude', GLO: Latitude)
GLO: Length = CLIP (p_web.GetSessionValue ('_ Length_'))
p_web.SetSessionValue ('GLO: Length', GLO: Length)
values are returned but not displayed in a form, my site is secure.
what is the correct procedure for this?
NT 11.43
-
p_web.GetLocation is asynchronous - the results are not returned immediately.
Also your use of GLO is suggestive of global variables, which you should not be using.
Cheers
Bruce