D
D
DragoN DragoN2020-11-16 08:29:37
PHP
DragoN DragoN, 2020-11-16 08:29:37

How to make push notifications on your own?

Hello!

I know how to push in the browser, but I can't figure out if it's possible not to use third party services to send the notification (firebase for example). Can you implement it yourself? When creating a worker, an event is specified:

self.addEventListener( 'push', function( e ) { ... } );


How to send push event to worker?
I'm interested in the pure version of the execution, without the use of libraries

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nokimaro, 2020-11-16
@DrDragoN

I see no objective reasons not to use firebase
But if you really want to complicate your life, then
web push - https://github.com/web-push-libs/web-push-php
apns (ios) - https://github.com/ immobiliare/ApnsPHP or google php apns
gcm (android) - https://github.com/CodeMonkeysRu/GCMMessage or google php gcm
and for a deeper dive into the topic read the book https://web-push-book.gauntface.com/

A
Alexey Tutubalin, 2020-11-16
@Kennius

https://pushjs.org/ easiest solution
https://redstapler.co/push-js-tutorial-javascript-...
https://cdnjs.com/libraries/push.js

A
Alex_Altpush, 2021-03-03
@Alex_Altpush

It can be implemented through VAPID keys. You can send from your back having the keys. But writing is difficult and long + the strapping should be decent. I recommend my altpush.io service, where nothing needs to be installed and programmed - ready for use after registration and creating a source

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question