From the course: JavaScript: Progressive Web Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Introduction to notifications - JavaScript Tutorial
From the course: JavaScript: Progressive Web Applications
Introduction to notifications
- [Narrator] Push notifications have been available in native mobile apps for awhile. They are a core feature used to reengage mobile users. A classic example is part of nearly every messaging app. When you receive a text message, chances are your device makes some kind of noise, a sound, a beep, vibration, and then a notification is delivered. Depending on how your device is configured, you might see a badge, notification dialogue, or a combination of some or all of those. You can click on a notification to immediately open your messaging app and interact with the message. Web push notifications seek to mimic this in the context of a web app. Before we implement push notifications, let's determine what we actually want to do in the context of a PWA. Ideally, we'd like to be able to send users of our PWA a notification to reengage them with our app. Since we can't rely on our app being active, this should be able to occur outside of the app's UI. To implement this, we'll need to work…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introduction to notifications2m 21s
-
(Locked)
Requesting permission to show notifications5m 26s
-
(Locked)
Displaying a notification4m 50s
-
(Locked)
Adding data to a notification4m 36s
-
(Locked)
Closing a notification3m 33s
-
(Locked)
Handling the notification click event11m 25s
-
(Locked)
Push messaging overview1m 24s
-
(Locked)
Adding Firebase Cloud Messaging to the project2m 15s
-
(Locked)
Subscribing to push messaging6m
-
(Locked)
Handling push notifications3m 14s
-
(Locked)
Sending a tickle using cURL4m 57s
-
(Locked)
Sending data in a push message2m 9s
-
(Locked)
Installing Mozilla's Web Push library2m 51s
-
(Locked)
Modifying the push event handler2m 52s
-
(Locked)
Modifying the notification click event3m 48s
-
(Locked)
Creating the web push script6m
-
(Locked)
Testing the hosted app5m 7s
-
(Locked)
-
-