Can we do web push notifications in chrome without using GCM/FCM? - google-chrome

I am trying to do web push notifications in Chrome without using GCM/FCM. Is it possible? I'm not able to find examples on how to use a different push service.

No, it is not possible to use another push service.
In Firefox, you can do it by modifying the dom.push.serverURL preference, but obviously you'd need privileged access to alter the value of the pref.
There are third-party services that you can use to implement push notifications, but they will use the Web Push API under the hood (so Autopush on Firefox, GCM/FCM on Chrome).

Yes. Using VAPID spec and service worker you can use web push notifications without FCM/GCM. For more information please look into below google docs.
https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/how-push-works

I have used Using VAPID for WebPush. This works in Firefox and IE Edge browser. But not mail in Chrome browser.
Again in Firefox action seems to be not working. Whereas in IE Edge, notification actions buttons will work

It can be done using Service Workers. It's new w3c feature.
I've not tried it yet, but you can have a look at it:
https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/
It's not compatible with all browsers. Ref.: http://caniuse.com/#feat=serviceworkers

good grief the advice here is DISGUSTINGLY bad
yes you can do it using https websockets and also a Microsoft project called SignalR which doesn't even "need" browser support, i.e it will work in javascript no matter what
the reason I mention SignalR is that is DEGRADES the mechanic to the bet fit to ensure it works whatever the weather.. tools they use are
from old sckoole long polling
all the way up to WebSockets under the covers when it's available
(and gracefully fall back to other techniques and technologies when it isn't, while the application code remains the same)

Related

more insights on how PWA works

might be very basic question but just wanted to clear out my doubt, since I'm seeing PWA is like alternative for native application.
What if browser fail to read/understand manifest file?
what if user is having other/older browser? (most of the time I see e.g of chrome)
after installation what are the browser dependencies for PWA?
Please guide me with the above.
Thanks
One of the more important concepts in a PWA is that it is built following the principle of progressive enhancement, this means that the website would function ordinarily on older browsers (including Safari) and then gain PWA abilities if the user's browser supports them.
Therefore in answer to your three questions:
Website would function as normal without the option to "Add to HomeScreen"
Same.
The PWA runs using the browser, therefore any functionality supported by the browser will be included in your PWA.

Is there any way to know if a download is happening

Is there any way to know if a download through a browser is happening? (I am thinking of creating an app,though whole concept relies whether this particular feature is possible or not)
For example: Say I start downloading a file from a web browser, and a program is running in the background( preferably written in Java) which can detect that a download is happening and it can get access to the link.
Ideally it should be able to detect from any browser, but even if it works with one browser it is fine for me at the moment! Any ideas if this is even possible?
I want to do the same thing. My first thoughts are :
1. Low level browser independent :
Sniff traffic and filter captured packets (Protocols HTTP/FTP + other filter rules). You may use WinPcap or even try the LSP approach.
2. High level browser dependent : Create browser plug-ins (BHO for Microsoft Internet Explorer, Extension for Google Chrome, Add-ons for Mozilla Firefox)

How do I enable desktop notifications in Chromium Embedded Framework (CEF)?

How do I enable desktop notifications in Chromium Embedded Framework (CEF)?
When I load my url in Google Chrome, window.webkitNotifications is non-null.
When I load my url in my embedded CEF browser, window.webkitNotifications is null.
if(!window.webkitNotifications) {
alert("You need to use The Google Chrome Browser to get this feature!");
return false;
}
Are desktop notifications supported in CEF? If so, how do I enable them?
As far as I know, current CEF versions don't support this feature.
I also needed this functionality in my project. I ended up implementing it myself, under a different namespace with slightly different functionality.
So you can implement it yourself using JS Extensions. Might take some work, but it'll get you what you need.
You can also try asking that question in the CEF Support Forum, you might get a better answer than "do it yourself".
I'd love to hear a better solution for this.

How to promote to install Chrome Extensions from your own website?

When I visit some websites, on top of the browser it promotes me to install Chrome Extension by saying "This website now has Google Chrome Extension... Install".
Anyone knows how to do this? Does Google already provide scripts to do this?
Example: Visit the following site using Chrome:
http://www.independent.co.uk
Now, it's possible to do what you need. Just follow this link, that explains how to use "inline" installation once you've published your app or extension at Chrome Webstore.
PS. Inline installation only works in Chrome 15+
Paul Kinlan's Badgemator is a good resource for this sort of thing. It creates a JavaScript snippet that you can put on your site in order to direct users to the webstore entry.
It doesn't attempt to mimic Chrome's infobar in the same way that The Independent does, but I personally think that's a good thing. Pretending to be part of the browser is a good way to confuse users, and isn't something I'd recommend (especially now that the infobar extends outside the browser window into Chrome's own UI).
What you're seeing is not built into Chrome, and not provided by Google.
The site will have some code that detects your browser agent (either via Javascript or a server-side script), sees that it's Chrome, and then adds some extra HTML/CSS/Javascript to make a mock UI element to grab your attention. Inspect the element to see what's really happening.
Another example is http://page2rss.com/page?url=www.stackoverflow.com/
Also, see Alerting website visitors that a chrome extension is available - how?
I wrote a jQuery extension that does just that: http://blog.dreasgrech.com/2012/01/promoting-your-chrome-extension-with.html
The simplest way to use it is to simply pass the ID of your Chrome extension:
$.fn.extInfobar({
id: 'nbilgjjflfiiijecdjpnbganoiafneph'
});
That generates the following:
From Chrome 15 there is API for this.
Just ask Chrome if your extension is installed.
You need to publish your extension in Google Chrome Extensions site, then you'll be able to publish it in your site.
You'll need to pay a one-time fee ($5) in order to get registered as a developer.
As of 06/12/2018, inline installation is deprecated. For more information, read our Chromium Blog post and Migration FAQ.
From: https://developer.chrome.com/webstore/inline_installation

Are there any web standards for voice over IP?

Web browser plug-ins such as Flash already provide VoIP functionality in a web browser, but is it possible to have browser VoIP without any plug-ins?
Ericsson Labs has posted information using the device element to allow for microphone input. This, in addition with WebSockets could be used to implement VoIP. However, the device element is not implemented in any web browser yet.
No there isn't but the device element will likely be the way in the future, as you mentioned. I don't think it will take too long for browsers to look into it however. There are also the WAC APIs, but they are only on mobile, and not shipping quite yet.
Update: There is now a standard in development called WebRTC. Drafts of this spec are supported by Chrome and Firefox. Microsoft have made an alternative proposal called CU-RTC-Web