I have an Android Library project com.random.lib
, and an Android Application project com.random.app
.
com.random.app
is using Library com.random.lib
.
I've installed com.random.app
on my phone.
The Library com.random.lib
is registered in Firebase Project FireLib
, while Application com.random.app
also has its own Firebase Project FireApp
.
The com.random.lib
is subscribing to awesome
topic in FireLib
.
FirebaseMessaging.getInstance().subscribeToTopic("awesome");
The com.random.app
is subscribing to random
topic in FireApp
.
FirebaseMessaging.getInstance().subscribeToTopic("random");
However, when I try to push a message to awesome
topic from FireLib
console, my phone didn't receive the push. When I push a new message to random
topic from FireApp
console, my phone received the push successfully.
Q: How to receive push message from awesome
topic if a message is sent from FireLib
?
I've bumped into this solution and I've tried to send a push message directly to a single device using FCM registration token and it works (My phone did receive both push messages from both Firebase projects). However it's not what I want since I need to target the receiver based on the topic.