2

I manage to register a firebase notification topic with this code:

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

But I want to register this topic after the installation,so even if the application never got launched it would receive the notification. How can I run this line or define it with the installation?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Zach Bublil
  • 857
  • 10
  • 28
  • Possible duplicate of [How To Create Topic in FCM Notifications](http://stackoverflow.com/questions/37367292/how-to-create-topic-in-fcm-notifications) – Vishal Patoliya ツ Sep 01 '16 at 13:07

1 Answers1

2

Before you launch the app for the first time no broadcast will arrive to it. It is essentially disabled. Broadcasts such as install referrer come directly after first launch. User has to launch app manually first.

mhenryk
  • 551
  • 5
  • 13