I have some geolocation code on a web page and all it does is to show a pointer on my geolocation.
For testing is works fine on my local computer when I just open the .html file on my web browser.
The problem is that I need to test it when moving so I want to open it on my mobile.
I have tried enabling location services on my mobile but still no marker.
The problem is that this is not a cordova or mobile app, just a web page and I don't have host with https so my question is...
How do I get the geolocation on my web page to work on my mobile for testing purposes? Are there any browsers or settings (iphone) that will stop this geolocation restrictions so I can test my code?
Use USB debugging then [as long as you don't need your server] you can unplug your mobile and wander around.
Related
So I am using navigator.serial in my reactjs PWA to access the COM-Ports and receive information from a external bluetooth GNSS receiver.
This works perfect on any Windows device but fails on any mobile device that are using android/ios.
I found out that the serial API is not implemented on mobile, is there a workaround to this other than the bluetooth web API`? Any other way to listen to COM-Ports on mobile?
i build a Google Maps Javascrip API web app. I used to init the map with geolocation. So it was asking the browser for permission and it worked fine.
Now my desktop Chrome simply doesn't support the geolocation in my app. I went to Properties to check the geolocation stuff, it was all right. I don't know the reason. Maybe due to the debug process or running a test on my desktop instead of my website (like an issue here).
So what might be the problem and how can I enable geolocation on my website again? Normally I'd like to have a button to prompt geolocation if the site was blocked.
Located the problem: something happened with HTTPS redirecting which caused geolocation not to work for it requires HTTPS connection. I fixed it in .htaccess and now it's working.
So my react web application loads perfectly fine on Android Chrome Browser, and other browsers such as UC Browser, Safari on iOS.
However, recently we found that the web application loads blank page when opened using Android Native/Stock/Default Browser ( The blue globe icon ) found on any Samsung / Lenovo devices.
I was able to use weinre / ngrok to attach web debugger, but I was not able to find any errors. The browser would just stop requesting for more static assets and stop doing anything.
I ran another test for my internal web application which is also a react web app (same config), and it loads fine on Android Native/Stock/Default Browser. I'm looking for clue as to what may cause this browser to stop requesting from the webserver...
Thx
Recent versions of Chrome for Android allow the installation of a web page in the home screen, using the web app manifest.
But here's my question: how do I detect in Javascript whether the page was launched from the home screen? I found a page advising the use of window.matchMedia, but this does not seem to work with Chrome 47 on Android.
Anyway, is there a solution at all for this problem?
Visiting www.google.com on the Android browser (or even with an android spoofed user-agent), presents the option to "Share Location". When clicked, it uses the GPS/Cell phone towers to figure out the location. I tried the google.loader.clientLocation but that only works using the IP address.
Is there a method to tap into the Android OS and access GPS data from a regular web application (and not an Android application) similar to the way Google does?
[Perhaps Google uses the Google Gears app on Android to access this data.]
Thanks!
This is an HTML5 API, and it'll work on Webkit-derivatives, Chrome, and Firefox 3.5 (for now).
http://dev.w3.org/geo/api/spec-source.html
http://merged.ca/iphone/html5-geolocation
I was trying that recently and found this forum posting interesting. I did not find a real good way to do this either and it doesn't look like we can do that without writing our own app which opens a browser instance.
http://androidforums.com/support/8868-how-get-gps-coordinates-browser.html
Here is also a nice example: http://klauskjeldsen.dk/w3c-geolocation-api-html5/