Push Notification Topics

Hi How can I get push notification topics to work?How to subscribe to a topic.And send a push notification to a topic?That is not possible?I have to send one by one and handle the topics on my own server that doesn’t seem very promising.So please clear my confusion thank you.I’m not sure about apn but fcm for sure supports topics related stuff.

1 Like

Do you mean categories?

Hi @fanofskynyrd ,No definitely not.
https://firebase.google.com/docs/cloud-messaging/android/topic-messaging
This is what I mean.The usage is:
You subscribe to different topics the different users.Like topics are admin,user,auther
So we subscribe those people with their related types.And then we can do something like->
Send a message to all the people under the same topic.That’s what it does.
How it works?Firebase handles creating and using all those stuffs on their server so all you send is a topic name and a message,but if there’s no capability like that.You have to send something like.

{
msg : ‘test’,
users:[
‘sds21ds2’,‘asdads54sad5dsa’,‘ads5das45ds’,‘ads5dsa4a5ds’,…//userIds
]
}

Which is not a really neat approach and the payload could be very huge also imagine sending to 1 million users.That would be frustrating for expo server and also client’s server or app.

Hi Steve,

Were you able to come up with a workaround for this?

Yeah eject to bare workflow and use fcm on both android and ios and don’t use this,that was the solution!

After ejecting the project, are you using expo-notifications to work with push notifications or have you used other modules?

No you should use firebase messaging.

this is not true. you can use expo-notifications and the related service just fine. whether you want to use fcm directly rather than the expo notification service as a wrapper is not related to if you’re in managed or bare workflow, it’s up to you in both circumstances and depends on your requirements.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.