This project is based on "Lapit Chat App Series" Tutorial, all the commands are customized according to the Tutorial series. To have better understanding on the "index.js" read full details below or you can also watch Tutorial here :
Part - 21 : Firebase Push Notification with Android
Part - 22 : Firebase Push Notification with Android
Part - 23 : Firebase Push Notification with Android
Or you can Browser the full "Lapit - Chat App series" here :
Lapit Chat App - Firebase - Android Studio
You can download and use index.js in your Firebase Functions Folder.
Check the index file here : index.js
Users Table :
- Users
- user_push_id
- device_token : user_device_token
- name : user_name
Notification Table :
- notifications
- to_user_id
- notification_id
- from : from_user_id
Currently this method works with user who is logged in a single device instead of multiple. I'll be adding code for Multiple device login too, in future.