User Centric Push Notifications
Opened this issue ยท 3 comments
IDEAS ๐ก๐ก๐ก :
Let the user choose:
- "Yes I do want 'THIS type of push notification' for THIS reason."
- "Yes I want my push notification to be measured by the POW!-Machine to make the app easier to use later."
- make up your own cryptic* standard message in push notification.
*By cryptic I mean text useless to an advertiser. - Set your own dates for push notification
Questions:
- Does "setTimeout" mean that the user can "set the timeout" and get the notification when she wants it?
- Where should this code go? In a component?
I just put it here.
add gatsby-plugin-offline
Here is the original code example from:
https://www.gatsbyjs.org/packages/gatsby-plugin-offline
// show a notification after 15 seconds (the notification
// permission must be granted first)
setTimeout(() => {
self.registration.showNotification("Hello, world!")
}, 15000)
// register a custom navigation route
const customRoute = new workbox.routing.NavigationRoute(({ event }) => {
// ...
})
workbox.routing.registerRoute(customRoute)
I added gatsby-plugin-offline after I read this blog post by https://github.com/hashimwarren
:
https://www.gatsbyjs.org/blog/100days/pwa/#challenge-7-make-your-gatsby-site-work-with-poor-internet-service-and-offline
Great research, and thoughts ๐