raae/pow-app

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:

  1. Does "setTimeout" mean that the user can "set the timeout" and get the notification when she wants it?
  2. 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)

raae commented

Great research, and thoughts ๐ŸŽ‰