Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Real-time Push notifications with Firebase

I recently signed up to use Firebase and I can't seem to figure out how to push notifications to specific users.

For my use, I guess you can think of it like Facebook. Whenever a user does something, say posts an interesting article for their friends to read, I want all of the user's friends to be notified of that event. So, using Firebase, how would one make it possible to notify only their friends and not everyone? My database stores the conenctions.

Perhaps there is a way to have each user be a node in the Firebase database and each time a notification is sent, The user will constantly check his node, and if something appears, pulls it and then delete it.

The examples on Firebase seems to be sort of basic. I wish there was a user-specific push notification example.

like image 653
Billy Boldwen Avatar asked Mar 17 '13 00:03

Billy Boldwen


1 Answers

Now Firebase supports Push Notification. Google rebranded GCM to Firebase Cloud Messaging and it now offers this cross platform service. Firebase also offers notifications.

These are the differences between these two services:

Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.

Firebase Notifications is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, Firebase Notifications lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns. If you want a more detailed comparison. Read this.

like image 74
JúlioCézar Avatar answered Oct 24 '22 13:10

JúlioCézar