My web application uses the Notification API.
I thought KitKat's Chrome browser was supposed to have it, or at least the old webkitNotifications
. But both window.Notification
and window.webkitNotifications
are undefined
in my tests in Chrome in Android 4.4.
Is there a way to push notifications from the browser to the user when the browser isn't visible in Android 4.4 ? Or do I still have to embed my web app in an Android application to achieve this ? Of course I'm open to other solutions than the HTML5 Notification API, as long as they're practical for my users (no flash). Or to a reliable webkit based alternative to Chrome and having a notification API.
For sending Notification to any android Device you can use two technology: 1) Push. 2) Pull. For Push Technology you can use GCM(Google cloud messaging). For Pull Technology you can make you application continuously keep on connecting to server and trying to fetch data if it is available from there.
As of Chrome version 42, the Push API and Notification API are available to developers. The Push API in Chrome relies on a few different pieces of technology, including Web App Manifests and Service Workers. In this post we'll look at each of these technologies, but only the bare minimum to get push messaging up and running.
When you browse sites with intrusive or misleading notifications, Chrome automatically blocks notifications and recommends you continue to block these notifications. If you’re browsing in Incognito mode, you won’t get notifications. On your Android phone or tablet, open the Chrome app .
Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray. Button icons not visible for Mac OS X users. Additional details about this item. Title of one item of a list notification. The app icon mask is not visible for Mac OS X users. A URL to the app icon mask.
On your Android phone or tablet, open the Chrome app . Go to the website you want to change notifications from. To the left of the address bar, tap Lock Permissions. If a menu opens: Select the setting you want to change. If no menu opens: Permissions are in their original settings. On your Android phone or tablet, open the Chrome app .
Unfortunately it seems that Chrome on Android isn't compatible with HTML5 Notification API according to this. BTW I tried this demo on chrome on my Nexus 7 with stock kit Kat on it and the demo say's my browser isn't compatible :/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With