Push Notifications: Totally Tooling Tips (S3, E3)
Key Takeaways
Implementing Push Notifications for web applications using Chrome APIs
Full Transcript
[Music] so my friend's son does this really cute thing where they install games on their phone and then for weeks after they keep getting notifications saying that their Village is under attack can you do that on the web now you can now you can how basically what happens is you register your service worker you then ask it to subscribe use to push message shows a little dialogue saying do you want to allow this to happen yes or no so hopefully then the kids won't actually enable this at that point but if they do then that point you'll get a special token that is for that user send that to your server keep it when you want to trigger a push notification um you can then use that endpoint send it a specific request and that will basically wake up the service worker on that user device and go cool there's a push message what do you want to do about it at that point you can just show a notification you can go back to the server and say hey what was this for um you show you notific and then you can respond to click events nice so that's literally like the whole endtoend flow start to finish so can push notifications can with the push API can they show me like images can I include content in there what can what can I you can do title title text you can do body text you can have an image to the side of the notification and you can also do buttons now as well so you can actually add like two buttons that you can respond so I can show an image saying that my you know showing that my Village is on fire but also a button to like extinguish the fire or watch it burn watch it burn I don't know what very dark very quick um it's also interesting because now we're looking at doing native notifications for um Mac which is really nice because it means that we get rid of our own notification like Center thing we're now going back into like native notifications and their trades and whatever else goes with it um push notifications are not a chrome only thing right no so they're in Chrome and Firefox at the moment I think other browser vendors once they start doing service work and they can start looking at it as well sweet um there is some bad stuff with chrome in the sense we have we use GCM so we have some proprietary bits what's is GCM GCM good point Google Cloud messaging okay I've been drinking the Kool-Aid for too long um so there's some proprietary bits you have to do for that but again there's new specs that are coming up that will wipe all of that out so then because the moment you have to go into Google developer console you have to register for an API key all of that's going to go away um so you just have one API one set way of doing this um that all the browser vendors can then take and use it's going to be so much better if I'm correct we have a Cod laab on push notifications as well yes people can check out which is well worth doing because that one is regularly kept up to date I think my old blog post at this point has probably seen better days so basically you're saying don't visit your blog under any circumstances oh that's just a blanket rule for all of my content but yes that's what I'm saying but yeah there is a blog post and it will step you through all the guides and it also goes through GCM and how to set all that stuff up um so yeah go check that out oh and um if someone wants to like uh simulate push notifications uh Dev tools lets you do this I think does it yes it does oh is that the Bell icon that's the Bell icon yes and you can do that from service work T cool [Music]
Original Description
In Push Notifications, Totally Tooling Tips, Matt and Addy talk about Push Notifications for web applications. These allow you to re-engage users with breaking news and information about new content.
Push Notifications Tutorial: https://goo.gl/HFMmef
Watch more episodes of Totally Tooling Tips here: https://goo.gl/IoXka7
Subscribe to the Chrome Developers channel at http://goo.gl/LLLNvf
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Chrome for Developers · Chrome for Developers · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Polymer Performance Patterns (The Polymer Summit 2015)
Chrome for Developers
Polymer Power Tools (The Polymer Summit 2015)
Chrome for Developers
Chrome Dev Summit 2014 – Chrome Case Studies
Chrome for Developers
Web Directions Code 2015 round up
Chrome for Developers
Maintainable Code - HTTP203
Chrome for Developers
iron-ajax… wat?! -- Polycasts #26
Chrome for Developers
The Guardian - Supercharged
Chrome for Developers
ES2015 (next version of JavaScript), Totally Tooling Tips (S2 Ep1)
Chrome for Developers
#AskPolymer: Rob answers all the questions ever -- Polycasts #27
Chrome for Developers
The Future of JavaScript - HTTP203
Chrome for Developers
Data Binding 101 -- Polycasts #28
Chrome for Developers
The Guardian part 2 - Supercharged
Chrome for Developers
The Future of Web Audio: with Chris Wilson and Chris Lowis
Chrome for Developers
Chrome 46: New motion-path animations, client hints and service worker improvements
Chrome for Developers
Sublime Snippets, Totally Tooling Tips (S2 Ep2)
Chrome for Developers
#AskPolymer: How do you make the show? -- Polycasts #29
Chrome for Developers
Critical Path CSS, Totally Tooling Tips (S2 Mini Tip #1)
Chrome for Developers
Binding to Objects -- Polycasts #30
Chrome for Developers
Player FM - Supercharged
Chrome for Developers
Where’s the Designer? #AskPolymer -- Polycasts #31
Chrome for Developers
Jake Beats Wikipedia - HTTP203
Chrome for Developers
Supercharged Observers! -- Polycasts #32
Chrome for Developers
Jai's Web blog - Supercharged
Chrome for Developers
Windows Command-line Tooling, Totally Tooling Tips (S2, Ep4)
Chrome for Developers
What about internationalization? #AskPolymer -- Polycasts #33
Chrome for Developers
Developing for Billions (Chrome Dev Summit 2015)
Chrome for Developers
Google+ Performance Improvement Comparison
Chrome for Developers
Deploying HTTPS: The Green Lock and Beyond (Chrome Dev Summit 2015)
Chrome for Developers
Progressive Web Apps (Chrome Dev Summit 2015)
Chrome for Developers
Instant Loading with Service Workers (Chrome Dev Summit 2015)
Chrome for Developers
Increase Engagement with Web Push Notifications (Chrome Dev Summit 2015)
Chrome for Developers
Engaging with the Real World: Web Bluetooth and Physical Web (Chrome Dev Summit 2015)
Chrome for Developers
Asking for Permission: respectful, opinionated UI (Chrome Dev Summit 2015)
Chrome for Developers
Polymer - State of the Union (Chrome Dev Summit 2015)
Chrome for Developers
Building Progressive Web Apps with Polymer (Chrome Dev Summit 2015)
Chrome for Developers
Introduction to RAIL (Chrome Dev Summit 2015)
Chrome for Developers
DevTools in 2015: Authoring to the max (Chrome Dev Summit 2015)
Chrome for Developers
RAIL in the real world (Chrome Dev Summit 2015)
Chrome for Developers
#ChromeDevSummit talks are up - W00T! -- Polycast #34
Chrome for Developers
V8 Performance from the Driver's Seat (Chrome Dev Summit 2015)
Chrome for Developers
Quantify and improve real-world RAIL (Chrome Dev Summit 2015)
Chrome for Developers
Owning your performance: RAIL (Chrome Dev Summit 2015)
Chrome for Developers
HTTP/2 101 (Chrome Dev Summit 2015)
Chrome for Developers
Leadership Panel (Chrome Dev Summit 2015)
Chrome for Developers
Build Processes, Totally Tooling Tips (S2, Ep 5)
Chrome for Developers
Accessibility (Chrome Dev Summit 2015)
Chrome for Developers
Binding to Arrays -- Polycasts #35
Chrome for Developers
HTTP2 - HTTP203
Chrome for Developers
Chrome 47: Splash Screens, requestIdleCallback and better desktop notifications (New in Chrome)
Chrome for Developers
Call For Submissions - Supercharged
Chrome for Developers
Cross Device Testing, Totally Tooling Tips (S2 Ep6)
Chrome for Developers
Testing AJAX with Web Component Tester -- Polycasts #37
Chrome for Developers
Slack: Extended Xmas Special - Supercharged
Chrome for Developers
Browser testing with Travis & Sauce Labs -- Polycasts #38
Chrome for Developers
Optimize for production with Vulcanize -- Polycasts #39
Chrome for Developers
Highlights from Chrome Dev Summit 2015
Chrome for Developers
Chrome 48: Custom buttons in notifications, DevTools Security panel, and Presentation mode
Chrome for Developers
Crisper: Protecting your Polymer app with CSP -- Polycasts #40
Chrome for Developers
How do I use Sass with Polymer? #AskPolymer -- Polycasts #41
Chrome for Developers
Colors – DevTools Tonight #0 (Pilot)
Chrome for Developers
More on: AI Workflow Automation
View skill →Related Reads
📰
📰
📰
📰
How I use python to save hours every week
Dev.to AI
What Are AI Software Solutions and How Can They Transform Your Business?
Dev.to · upwork floating infotech
AI Shorts generators you can actually edit (not a black box)
Dev.to · Reel Mint
I Wanted To Automate Website Testing Without Writing Hundreds Of Scripts. AI Changed The Approach.
Medium · AI
🎓
Tutor Explanation
DeepCamp AI