Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Create Topic in FCM Notifications

I'm trying Firebase-Notification API the service is worked perfect when i send downstream message from console to app, but how to send message to topic registered users ?

i did in android side

FirebaseMessaging.getInstance().subscribeToTopic("TopicName"); 

but when i try send downstream message from console to topic it's says

This project does not have any topics 

EDIT : i figured out that after mapping the topic it's take up to 1 day to show up in Firebase Console

like image 702
Moh'd Awad Avatar asked May 21 '16 19:05

Moh'd Awad


1 Answers

This is an alternate path.

If you subscribe a client app to an unexisting topic then the topic will also be created without having to call any firebase url request.

It' will also take a couple of hours to appear on Firebase Console.

By using google shared example: https://github.com/firebase/quickstart-android/tree/master/messaging you can confirm the same.

        FirebaseMessaging.getInstance().subscribeToTopic("news");         Log.d(TAG, "Subscribed to news topic"); 
like image 114
Juan Pablo Avatar answered Oct 18 '22 18:10

Juan Pablo