I'm newly learning android studio, so however I have one doubt in developing a android app that:
How can we subscribe to multiple topics in FCM?
Here is my code
public void subscribeToPushService() {
FirebaseMessaging.getInstance().subscribeToTopic("News");
Log.d("myname", "Subscribed");
// Toast.makeText(Simple.this, "Subscribed", Toast.LENGTH_SHORT).show();
String token = FirebaseInstanceId.getInstance().getToken();
// Log and toast
Log.d("myname", token);
// Toast.makeText(Simple.this, token, Toast.LENGTH_SHORT).show();
}
you can see in the above code I have already subscribed to one topic "News" so
how can I subscribe to multiple topics instead of one?
Is it possible, if yes how can we do that?