Firebase cloud messages does not send messages to all devices using the app

Asked

Viewed 109 times

2

I implemented the cloud messaging of Firebase using flutter and so far so good, I tested the sending of push notifications to an emulator of an android and it worked fine, the notification arrived in my emulator, however, I generated an APK of my application and tested again, I sent the push notification by Firebase and it didn’t work, just sent it to my emulator, has anyone had similar problems? My phone is on Android 9, already emulator on Android 6.

Emulator I’ve tested in previous notification

  • did not understand why the question was closed before being asked at least one comment suggesting an improvement.

  • you’re probably using the fcm_token to send your notifications/messages. Each device ends up having one fcm_token different, so by following this method you need to send 3 notifications one for each token (I don’t remember whether it is possible to send a notification for 3 tokens). Tip: USE TOPICS. Create a topic with a unique code of that user, in your app give a subscribeToTopic in that topic and send the notification to this topic. The 3 labels will receive the notification.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.