0

I tried using

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

but it's been 1 day and half since i used this code line and still nothing shows up. any suggustions?

I have read this but nothing helped: Android: Subscribe to Firebase Cloud Messaging(FCM) Topic

edit: my problem is that the topic i created doesnt show in my firebase notification console.

Community
  • 1
  • 1
Yarden Rotem
  • 85
  • 12

1 Answers1

1

I've used topic based FCM in an app before and I actually had to send a message to the topic to which I was subscribing to get it to show up in the Firebase Cloud Messaging console. You could use curl or a chrome plugin such as ARC to send a message on that topic.

jos76
  • 141
  • 1
  • 2
  • 8
  • can i get an explanation on how to send a message from ARC? ive all ready installed it. – Yarden Rotem Oct 31 '16 at 16:18
  • you need to POST to `https://fcm.googleapis.com/fcm/send` you have to set your Authorization header to your authorization key. Set the Content-Type to application/json. The payload is just JSON. Take a look [here](https://firebase.google.com/docs/cloud-messaging/android/topic-messaging#http_post_request) for more info – jos76 Oct 31 '16 at 18:41
  • im getting this error while using the ARC: "JSON_PARSING_ERROR: Unexpected token END OF FILE at position 0. " – Yarden Rotem Oct 31 '16 at 20:54