The graph below from Firebase Cloud Messaging (FCM) Console shows how only ~95% of our push are being received by the phones. This is causing lots of issues for us as we're creating a VoIP app and need the push to be received immediately. Can anyone explain why this is happening and how to get this rate closer to 100%?
Some important notes:
You can send up to 240 messages/minute and 5,000 messages/hour to a single device.
Send a test notification messageOpen the Notifications composer and select New notification. Enter the message text. Select Send test message. In the field labeled Add an FCM registration token, enter the registration token you obtained in a previous section of this guide.
Following is the example of using Firebase Cloud Messaging to push the notifications to the mobile devices which will contain our android application. Create a new android application using android studio and give names as PushNotification.
Firebase Cloud Messaging (FCM) is a cross-platform (Android, iOS, Mobile Web) messaging solution which is used to send notification messages to the mobile devices at no cost. By using firebase we can easily send messages to any device or schedule messages to send in the user’s local time zone based on our requirements.
The following is the gist of adding FCM to the app. Go to Tools -> Firebase -> Cloud Messaging -> Set up Firebase Cloud Messaging Connect your app to Firebase: Complete the three steps of creating a Firebase project.
Firebase notifications behave differently depending on the foreground/background state of the receiving app. If you want foregrounded apps to receive notification messages or data messages, you’ll need to write code to handle the onMessageReceived callback.
pir,
As far as I understand, there are many reasons why a message might not be delivered. I think without looking at your specific data, it is going to be difficult for anyone to give a conclusive answer.
What I do recommend is that you spend some time reading Understanding message delivery on the Firebase Documentation. Although I recommend you read the entire article, of particular interst for you will probably be the BigQuery data export section. This covers exporting your message data to BigQuery. Data exported to BigQuery is covered in the What data is exported to BigQuery? section. I think you're going to be interested in the event
field which holds data about the type of event that occurred. These events types include:
setDeliveryMetricsExportToBigQuery(boolean)
).I hope this helps. Good luck!
There are several reasons that could make notification not delivered.
There are devices that might have a specific battery optimization that will stop notifications from showing. And to fix that you might ask user to do the following. check Settings > Battery > Battery Optimization or Adaptive Battery > Find your app and press Don't optimize
The app has might push permissions Disabled In Device Settings, user can turn on and off push notifications. From notification setting under Settings > Apps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With