Fetch device location from local web page - javascript

How do i fetch the latitude and longitude of the android device from a local html page in chrome using javascript and jquery ?
Chrome doesn't fetch location nor does it ask for user permission(i think its because of its security).
Mozilla on the other hand does this better, but my html pages are compatible with chrome for many other reasons(not much security).
I have tried the HTML5 geoLocation api too, but doesn't help in chrome.

Related

Google Maps API does'nt work on another devices

I tried to access my local website that show a map to gain the coordinates with google maps API, somehow when I access my local website on other devices such as smartphone the map and the coordinates didn't show up. I'm using apache XAMPP, can someone explain how suppose I do to solve this?
Sorry for my bad english
I tried to configre my httpd-files on XAMPP for gaining acces for my local website on smartphone but still, didn't show any progress.

Alternative to Chrome's Background Fetch Api?

So I just came across Chrome's "Background Fetch API" and I'm wondering if Firefox and Safari provide a similar API.
Is there an API provided by Firefox and/or Safari that allows applications to successfully fetch large files (e.g. 100mb) - even when users navigate away from the relevant tab or window?
If not, is there a feasible way to polyfill this behaviour?

Google Proximity Beacon API : Build a web app to detect beacons (Progressive App)

I'm trying to build a web app to detect beacons in my room.
So far I have integrated the Google Beacon API on a webpage and using Google Client JS API have used the below services:
https://proximitybeacon.googleapis.com/v1beta1/beacons to fetach all the beacons of my project
https://proximitybeacon.googleapis.com/v1beta1/beaconinfo:getforobserved?key=+ apiKey to get all the attachments of my active beacon.
All the above is working fine, but this is different from what I'm looking for. Is there a way that when the web page open in chrome, a function is triggered whenever it finds a beacon. As per my undertanding this is possible using a native app (Android or iOS).
Google Nearby Notifications was an option to advertise URL but Nearby Notifications is Temporarily Muted
A little confused with the purpose of Google Beacon API.
Unfortunately, no, there are no browser-based APIs that let you change what is on a web page in a browser based on beacon detection.
For this to work, there would need to be JavaScript bindings to bluetooth scan events, something which does not exist on any platform. Google has some Chrome OS extensions that let you interact with Bluetooth via JavaScript, but these are not available in the Chrome browser on Android or in Windows/Mac versions.

can you access the google now api & cards from an API?

I have a little project where I want to display google now cards in a browser (Chrome) window. If you have android phone I pretty much want to replicate the google now desktop gadget but on a browser using javascript/html etc
Is the google now api available for this sort of stuff? I cant see it.

Chrome Tab Sync javascript API

Is there a javascript API for Chrome Tab Sync for web sites? I'm not asking about Chrome Extensions, just web sites.
For example, I'd like to store some text (a string) when you open a web site on the desktop then when you open that same page in the chrome mobile browser I'd like to display that stored text.
Is this possible? I know with Chrome Extensions there is chrome.storage, but I don't believe that is available for websites.
You should store that information:
on your server,
in the URL of the page (?mystring=...),
or on your server with a lookup key for the specific info in the URL.
Any one of these is an ordinary thing to do and will work for all browsers and all ways to get a page from one device to another, without relying on any features specific to Chrome.

Categories