Firebase Showing Success But Not Sending Cloud Messaging (android - Php)
I've done a lot of research to figure out why it's causing the problem, but I still can not figure out why. I can send notifications from console. I can send notifications to one d
Solution 1:
The logs show that you received the message:
D/MyFirebaseMsgService: From: 143966141911
D/MyFirebaseMsgService: Message data payload: {subtitle=This is a subtitle. subtitle, smallIcon=small_icon, sound=1, title=This is a title. title, vibrate=1, largeIcon=large_icon, message=here is a message. message, tickerText=Ticker text here...Ticker text here...Ticker text here}
It looks like you were looking for the notification to appear in the Notification Tray. Just call your sendNotification()
inside your if
statement for a data
payload (since that is what you're sending), like so:
if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Message data payload: " + remoteMessage.getData());
sendNotification(remoteMessage.getData().get("message");
}
Post a Comment for "Firebase Showing Success But Not Sending Cloud Messaging (android - Php)"