1.0.20 • Published 7 months ago

ku4es-notification v1.0.20

Weekly downloads
-
License
SEE LICENSE IN FI...
Repository
github
Last release
7 months ago

ku4es-notification

kodmunki utilities for EcmaScript Notifications

Usage

  1. Start server: npm run start
  2. Navigate to: https://local.notification.server:8444
  3. Request Permission. Then, subscribe.
  4. Copy the auth, endpoint, and p256dh into their appropriate places in the target ./send/*.sh file.
  5. Run your target ./send/*.sh. It should successfully generate a notification.
  6. Stop server: npm run stop

Next steps: 1. Set up a manifest so that you can get notifications when chrome is not open. 2. Set up APN so can get notifications on iOS 3. Set up GCM ID so can get notifications on legacy Chrome

Set Up Device

iOS

iOS does require some more steps than the traditional set up 1. In Safari Settings Advanced Features turn on Push API 2. In Safari Settings Advanced Features turn on Notifications. 3. In your manifest.json add "display": "standalone", to the root of the manifest (Note: notifications only work on iPhone when the user has added the PWA to their home screen)

Resources

https://web.dev/push-notifications-subscribing-a-user/ https://github.com/web-push-libs/web-push https://developer.chrome.com/blog/push-notifications-on-the-open-web/ https://medium.com/commencis/web-push-notifications-with-service-workers-cf6ec8005a6c https://web.dev/learn/pwa/web-app-manifest/ https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1 https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html

1.0.19

7 months ago

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.20

7 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.8

8 months ago

1.0.5

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago