I want to create topic in Firebase console for cloud messaging but I don't know how to create it. I want to send message to all the users who have installed my android app and the only way I found is through topic and I do not how to create it
With FirebaseMessaging first you will need to subscribe to a topic and whenever you send a message with respect to the topic, all the users subscribed to the topic will get the notification. Please refer to Send Messages using topic in Firebase
Lets take a example:
I am using a famous books app where there are multiple books listing and I liked a book named 'XYZ' and I want to get notified whenever there is anything related to book XYZ. So I will subscribe to topic XYZ and server will broadcast a notification using the topic 'XYZ' and as I have subscribed to topic 'XYZ' I will get the respective message.