Hi, so I have an app that was multiple push providers. Let's assume I have Parse and Firebase together.
The issue I'm having is that when sending push messages from Parse, there are two notifications displayed. I believe this is due to the onMessageReceived being called, although the push message was not sent through Firebase.
I also observed that remoteMessage.getMessageId is always null, when the push messages are NOT sent with firebase. Would it be safe to assume that when id is null, the messages are sent through some other push gcm receiver, like Parse, and the push should not be handled by firebase onMessageReceived ?
What do you think? Is it ok to return here:
if(TextUtils.isEmpty(id)){
return; // Message not sent through firebase have the ID null, so the message should be handled by other receivers
Random rand = new Random();
int n = rand.nextInt(50) + 1;
id = Integer.toString(n);
}
Hi, so I have an app that was multiple push providers. Let's assume I have Parse and Firebase together.
The issue I'm having is that when sending push messages from Parse, there are two notifications displayed. I believe this is due to the
onMessageReceivedbeing called, although the push message was not sent through Firebase.I also observed that
remoteMessage.getMessageIdis always null, when the push messages are NOT sent with firebase. Would it be safe to assume that whenidis null, the messages are sent through some other push gcm receiver, like Parse, and the push should not be handled by firebaseonMessageReceived?What do you think? Is it ok to return here: