tannercollin / Notica

Send browser notifications from your terminal. No installation. No registration.
https://notica.us
MIT License
344 stars 22 forks source link

Send messages without haveing to open the Notica page #4

Open jkaberg opened 6 years ago

jkaberg commented 6 years ago

Would be great if one didn't have to remember to open the page everytime 😄

Service workers seems like the ideal aphroach, https://github.com/w3c/ServiceWorker/blob/master/explainer.md

Example solution? https://github.com/GoogleChromeLabs/web-push-codelab

pwFoo commented 5 years ago

With service worker and closed browser notifications by a self hosted service would be awesome!

But how it could push to the service worker, because (websocket) connections won't work and will be closed after a short time. https://stackoverflow.com/questions/29741922/prevent-service-worker-from-automatically-stopping

Any update here?

tannercollin commented 5 years ago

Yeah it doesn't seem possible with websockets. I'd have to switch to the Push API.

I'm not sure this feature would be a huge benefit. My web browser is almost always open.

Also, you can open the web page any time before the notica function executes in case you forget.

For example, if you have:

$ 10-minute-long-task; notica Done!

You can open notica.us at 5 minutes and it will still work.

I'd happily accept a pull request though :)

pwFoo commented 5 years ago

Yes, but it looks like offline push notifications for mobile web based apps isn't possible with self hosted push service.

pwFoo commented 4 years ago

Any plans to move to webpush api? I think it would be an awesome service to register a client (browser) to a topic and push on-/offline notifications. Notica could run in docker Container and triggered by cli or http api call.

tannercollin commented 4 years ago

No plans for it right now on my end. Maybe if I get bored one day and think of it :P