Push notification
Push notifications are crisp clickable messages that help businesses to engage their audience, both on mobile and desktop.
Last updated
Push notifications are crisp clickable messages that help businesses to engage their audience, both on mobile and desktop.
Last updated
β
Goto: https://firebase.google.comββ
Step 1 :Create a Firebase Appβ
First, you should create a free Firebase account and create a new project there. You can visit firebase.google.com and signup if you don't have an account with Google earlier, and if you have an account, you can create a firebase app project. You can enter the project Name and Select Region, and it will create a Firebase project for you.β
Once the project gets Created, Navigate into Overview menu on the left side there you can see project overview and under that click on project settings there you have to click on cloud messaging you will get server key and sender ID as displayed in the below screenshotβ
ββ
Step 2 :β
Goto https://onesignal.com/. Create account or log in if you are already a registered user. Then click on 'Add New App' on the screen window. Enter app name and organisation name and click on add app as shown in the screenshot below
ββ
It will navigate to the page and asks you to select the platform ,select the platform (google android ) click on next
ββ
there you find the fields to enter Firebase server key and firebase server ID here you need to paste the server key and ID that you got from Step 1 and click on save as displayed in the screenshot below.
ββ
Step 3 :β
In onesignal.com after creating the project click on the project then settings >Key and ID's copy this one signal APP ID and rest API key shown in the screenshot given belowββ
Step 4 :Replace Server key and sender ID in your Project folderβ
Navigate to the project folder there on the left-hand side go to src>routes>restaurant >push notification>push-notification.component.tsβ
There you can replace the app Id and then below that navigate to the folder push-notification.service.ts you can paste the rest API key that you received.β
The above steps is to send push notifications for all the users .β
β