Detect Eddystone-URL directly from Chrome Browser - javascript

is there a client based javascript way to detect Eddystone-URL beacons directly from the Chrome browser in iOS?
I know Chrome has the widget for the today view wich works fine, but I need to detect new Eddystones without pulling down the notifcations window.
Say a user clicks on a link provided by the widget, gets redirected to the Chrome app, does stuff, walks around and gets in range from another beacon.
Right now he would have to pull down the tab again to receive the new URI. But I need some sort of notification from within the Browser.
I hope you get the idea.
Thanks in advance!
Cheers
p.

Unfortunately, this is not possible. Understand that Chrome for iOS is just a thin app around the standard native iOS UIWebView, so there is nothing you can do in JavaScript that you cannot do in Safari. And Apple does not implemented any JavaScript bindings to the CoreBluetooth APIs that would be needed to detect Eddystone-URL beacons. The bottleneck is more of an iOS restriction than a Chrome browser one.
Note that this is not true for the Chrome browser on other platforms, notably ChromeOS, which does provide such JavaScript APIs.

Related

How do i send browser messages even if website closed? [duplicate]

My goal is to send Gmail-style desktop notifications in Chrome or Firefox from a web app (let's call it X) that is NOT currently open in the browser, without requiring the user to install an app or extension. It's okay if the user needs to grant permission to receive notifications from X, and it's okay if the browser needs to be open for the notification to appear, as long as X doesn't need to be open in the browser. A solution that doesn't require any browser window to be open would also work.
I just spent the day digging into this, and so far I think I've learned:
Since OSX Mavericks, it has been possible to do this in Safari 7+ via Safari Push Notifications.
The Web Notifications API works in Chrome/Firefox, but requires the user's browser to be open to X.
Twitter sends similar web notifications without asking the user for permission first, but requires the user's browser to be open to Twitter.
There are lots of references to possible Growl implementations, but as far as I can tell, all of them require the user to install Growl and/or a Growl-enabled app to work.
I could be wrong about any of my statements above - I'd love to hear it! - and I'm open to any other solution too. Any ideas?
Thanks for reading.
You can send push notifications even when your web page is not active using Service Workers, the Notification API for service workers and the push API for server-initiated notifications (or scheduled notifications).
As of June 2016, Service Workers are supported in Chrome, Firefox and Opera. See the status at https://jakearchibald.github.io/isserviceworkerready/
See the following links for related discussions, status of implementation and specifications.
Service workers are enabled by default since Chrome 40, Firefox 33, and Opera 24. See the HTML5Rocks tutorial and MDN.
Push notifications: Chrome 42+, Firefox 44+
You can do exactly what you are looking for using the W3C Push API.
If you want to build everything from scratch I suggest to start reading this tutorial by Google. It is for Chrome, but Firefox works in a very similar way.
However it's a lot of work and the "standard" is still evolving: I suggest that you use a service like Pushpad (I am the founder).

Open Mozilla Firefox Browser using JavaScript

My Application would default start with Google Chrome. When User access one of the Menu Option , I would like to Open
That URL with Mozilla Firefox Browser. Not Google Chrome.
Can someone please help me on the same? Is this possible to Open explicit browser from JavaScript?
Thanks , Niraj Salot.
Which browser is opened is dependant on the users OS (if the browser is present, which browser is their primary etc etc), as such it's not something that can be done through a browser.
It would also be a massive security risk as if a browser could open an external application it would be open to exploits and abuses pretty much from the get go.
About the only permissiable way would be create a plug-in for Chrome which could request from the user if they would like to open the link in another browser, but then thats a alot of work for this.
You'd be better off checking what browser is being used (again since you have no control over which one the users are using) and politely ask that they open the link in firefox.

Open pdf documents in browser on Android 4+

I have seen several of these question from 1-2 years ago about Android pre-4.0. I want to ask this again for Android 4+.
I have a galaxy s3 running 4.3 and when I click on a pdf link it downloads the document rather than opening it in the browser.
I am building a website and it will have links to pdf documents. The desired behavior when one of my users clicks on the pdf link on their Android device is for the pdf document to just open like it would on a desktop browser.
Is there anything I can do to achieve this functionality, or does Android still not support this?
I cannot control the device that a user is using, so I'm looking for a solution that would achieve this functionality in as many cases as possible.
The stock browser does not support native viewing of PDFs. You can however redirect the link to google docs and view internally that way. To do this, launch your implicit view intent, as I suspect you are already doing, but prepend the URI with "https://docs.google.com/gview?url=" and Google will take care of the rest
Alternately, there are a few libraries that you will see linked around SO, but from what I saw while researching, most are proprietary and cost and even then they might not work 100%. Google docs is free and works as often as Google does, which given that this is their platform you have to imagine they make certain their service works close to 100% of the time.
it downloads the document rather than opening it in the browser.
"it" is a Web browser. There are many Web browsers for Android. A Web browser can do whatever it wants when the user clicks on a link to a PDF file.
The desired behavior when one of my users clicks on the pdf link on their Android device is for the pdf document to just open like it would on a desktop browser.
That is not the behavior of all desktop browsers, particularly depending upon user configuration (e.g., browser extensions). A desktop Web browser, like a mobile Web browser, is welcome to do whatever it wants when the user clicks on a link to a PDF file.
does Android still not support this?
Android is an OS. Android neither supports nor does not support this. Web browser applications will or will not support what you want.
I cannot control the device that a user is using, so I'm looking for a solution that would achieve this functionality in as many cases as possible.
You are welcome to test a variety of Android Web browsers, see if there are any that behave the way you like, and suggest to your users that you would prefer that they use those browsers. Your users, in turn, are welcome to honor or ignore your request.
Or, as Chris M points out, you are welcome to not show a PDF at all, but rather redirect the user to some URL that processes the PDF and renders it in some other way.

How to create Javascript/Chrome notifications that are shown over fullscreen applications

I have a web application (HTML5, CSS3, JQuery) that displays notifications using both methods: a growl-like jquery plugin (javascript+html), or using the Chrome notification API (only if you are using Chrome).
What I want is to create a javascript growl-like notification that is shown over all the other windows in the screen, even if you have another application focused in fullscreen mode.
I think that this is not possible with javascript because probably it is restricted to the browser window, but maybe with the Chrome notification API it could be done (this notifications popup over other applications, if they are not in fullscreen mode).
Recently Chrome updated its browser so that the notifications are not shown if you have an application in fullscreen. In general it is a good update but if you want to show the notification even if you are in a fullscreen app, how do you do that? Can the final user of the web application change the behaviour of this notifications and make them appear always?
PD: if there is another browser technology that allows this kind of notifications, please tell me.
As far as I am aware this is not possible, certainly not as any sort of cross-browser solution.

How do I detect user's location from a webpage opened in the Android browser?

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/

Categories

Resources