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.
Related
In the use case of building a browser, both seem like tools that could be used to mock up a UI for a chromium browser. Besides CEF being vastly better documented, whats the difference between the two for this use case?
Most APIs around Chromium provides the stable API and/or ABI that Google refuses to provide with their layer. By using CEF, QtWebEngine or any of the other wrappers, you don't have your code break all the time, plus the code actually compiles out of the box, which Chromium sources rarely does except for the exact configuration Google compiles.
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.
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)
I'd like to experiment with building a browser based on Chromium, ideally with support for Chrome-extensions.
I've looked into the Chromium Embedded Framework, which does not include support for extensions.
Are the only options available to either:
reimplement the extension-API on top of CEF; or to
base the project on the Chromium source,
or are there other alternatives?
Are the only options available to either:
reimplement the extension-API on top of CEF; or
to base the project on the Chromium source,
Pretty much. But, as wOxxOm mentions in comments, CEF plans to implement the API - eventually.
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