Notification API in Android Chrome browser

守給你的承諾、 提交于 2020-01-11 00:23:13

问题


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.


回答1:


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 :/



来源:https://stackoverflow.com/questions/21361968/notification-api-in-android-chrome-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!