New Chrome API to Enable Websites to Schedule Notifications for Future

Google Chrome is adding a new web API that will allow websites to reliably show a notification to a user without using Push Messages. A new flag has been added to Chromium OS code to enable this feature.

At present, the only way to send such notifications is through push notifications. This new API will allow websites to easily schedule notifications for future. According to the design document:

Introducing a showTrigger property to persistent web notifications to allow showing a notification at a specific point in time in the future. Websites can use this to reliably show a notification to a user without using Push Messages.

The design of this feature has two distinct parts. The first one handles all the changes necessary to store notifications that should not be shown immediately on the users device. The second part picks up from there and handles the logic to schedule the notifications to be shown at the expected time.

The bug that tracks this feature says that the time-based triggers could be used to implement alarms for calendar/clock applications. Other types of a trigger are possible, e.g. location-based. However, when this feature is available to developers, we might see many more use-cases. It will be interesting to watch how this feature evolves.

The Flag – Notification Triggers

The flag is named “Notification Triggers” which also makes me think that we might see more triggers not just time.

Flag Name: Notification Triggers

Flag Description: Enable the notification triggers Web API, which allows scheduling notifications at a specific time.

This has just been added to the code. We might have to wait for a few days before we can enable this and test. You will need to enable the Experimental Web Platform features flag for this to work.

Apart from that, we will need at least demo web implementations to start testing this. So, if you are a developer and planning to develop a new feature for a website or web app using this API, please drop a comment here so that rest of us can test this feature!

Stay tuned to Chrome Story for more updates!

PS: I have decided to do more Chrome OS how-to videos on the YouTube channel. Please consider subscribing and providing your feedback as I take baby-steps of Youtubing!


Leave a ReplyCancel reply

Discover more from Chrome Story

Subscribe now to keep reading and get access to the full archive.

Continue Reading