Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to style notifications shown by Chrome?

Using the showNotification method on a service worker registration, is it possible to style the notification that is shown, for example the color of the text?

I'm curious for both Android and desktop platforms.

like image 433
owencm Avatar asked Jan 04 '16 13:01

owencm


People also ask

How do I stop dirty messages in Chrome?

Tap on the gear icon, scroll down and tap on Search Settings, and then tap “Filter explicit results” under SafeSearch filters. On desktops and laptops, go to www.google.com and click Settings in the bottom-right corner; click on Search Settings; and click Turn on SafeSearch and then Lock SafeSearch.

What kind of notifications does Google Chrome send?

Unlike App Push Notifications, Chrome push notifications don't need any external application or software to display the push messages. Hence, you can reach out to your users on the Google Chrome browser, even when the users are not on your website.


1 Answers

No, today it is not possible (January 2016).

The specification for this API doesn't include low level styling of this kind as the API should be OS and platform independent and each OS may have very different notification styling so allowing customization on a level like text color likely isn't appropriate.

It is possible that slightly more generic styling such as bold, italics, light text etc may be supported in the future and these would only apply on platforms that are able to render stylized text in notifications.

like image 159
owencm Avatar answered Sep 28 '22 16:09

owencm