简体   繁体   English

触发少数高优先级通知后的 Firebase 推送通知延迟

[英]Firebase push notification delay after triggering few high priority notifications

I use Firebase high priority push notifications to trigger Panic alarms in Android devices.我使用 Firebase 高优先级推送通知来触发 Android 设备中的紧急警报。 For first few tries of push, immediately push notifications arrives and it works great.对于前几次推送尝试,推送通知立即到达并且效果很好。 But when i keep triggering push notifications after certain amount of time slowly delay keeps increasing.但是当我在一定时间后继续触发推送通知时,延迟会不断增加。

I want it to trigger immediately as it is Panic situation.我希望它立即触发,因为它是恐慌情况。

I also followed the documentation which read:我还遵循了以下文档

High priority : FCM attempts to deliver high priority messages immediately, allowing the FCM service to wake a sleeping device when necessary and to run some limited processing (including very limited network access).高优先级:FCM 尝试立即传递高优先级消息,允许 FCM 服务在必要时唤醒睡眠设备并运行一些有限的处理(包括非常有限的网络访问)。 High priority messages generally should result in user interaction with your app or its notifications.高优先级消息通常会导致用户与您的应用或其通知进行交互。 If FCM detects a pattern in which they don't, your messages may be de-prioritized.如果 FCM 检测到它们没有检测到的模式,您的消息可能会被取消优先级。 Android P introduced app standby buckets which limit the number of FCM high priority messages you can send to your app that don't result in the user using your app or viewing a notification. Android P 引入了应用待机桶,它限制了您可以发送到您的应用但不会导致用户使用您的应用或查看通知的 FCM 高优先级消息的数量。 If, in response to a high priority message, a notification is displayed in a way that is visible to the user, then your app standby bucket quota will not be consumed by that message.如果在响应高优先级消息时以用户可见的方式显示通知,则该消息不会消耗您的应用待机桶配额。

Because a small portion of the Android mobile population are on high latency networks, avoid opening a connection to your servers before displaying a notification.由于一小部分 Android 移动用户使用高延迟网络,因此请避免在显示通知之前打开与服务器的连接。 Calling back to the server before the end of the allowed processing time may be risky for users on high latency networks.在允许的处理时间结束之前回调到服务器对于高延迟网络上的用户来说可能是有风险的。 Instead, include the notification content in the FCM message and display it immediately.相反,将通知内容包含在 FCM 消息中并立即显示。 If you need to sync for additional in-app content on Android, you can schedule an FJD job or a JobIntentService to handle that in the background.如果您需要同步 Android 上的其他应用内内容,您可以安排 FJD 作业或 JobIntentService 在后台处理该内容。

How can I make sure high priority messages are triggered as soon as possible?如何确保尽快触发高优先级消息? May be within a minute in all cases.在所有情况下都可能在一分钟内。

FCM attempts to deliver high priority messages immediately, allowing the FCM service to wake a sleeping device when necessary and to run some limited processing (including very limited network access). FCM 尝试立即传递高优先级消息,允许 FCM 服务在必要时唤醒睡眠设备并运行一些有限的处理(包括非常有限的网络访问)。 High priority messages generally should result in user interaction with your app or its notifications.高优先级消息通常会导致用户与您的应用或其通知进行交互。 If FCM detects a pattern (such as testing pattern) then your messages may be de-prioritized.如果 FCM 检测到一种模式(例如测试模式),那么您的消息可能会被取消优先级。 Android P introduced app standby buckets which limit the number of FCM high priority messages you can send to your app that don't result in the user using your app or viewing a notification. Android P 引入了应用待机桶,它限制了您可以发送到您的应用但不会导致用户使用您的应用或查看通知的 FCM 高优先级消息的数量。 If, in response to a high priority message, a notification is displayed in a way that is visible to the user, then your app standby bucket quota will not be consumed by that message.如果在响应高优先级消息时以用户可见的方式显示通知,则该消息不会消耗您的应用待机桶配额。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Firebase Notification Composer:如何将通知优先级设置为“高”? - Firebase Notification Composer: How to set notification priority to "high"? 如何通过 AWS SNS 发送高优先级推送通知 - How to send the High priority push notification through AWS SNS Flutter - 延迟 Firebase 推送通知提示 - Flutter - Delay the Firebase Push Notification Prompt Firebase 如果设备闲置几分钟且未充电,则推送通知未发送 state - Firebase push notification not delivered if device is idle for few minutes and no charging state 使用带有世博会通知的 firebase 向特定用户发送推送通知 - Sending push notification to a specific user using firebase with expo notifications Firebase 功能推送通知 - Firebase Funtions push notifications Laravel 推送通知与 Firebase - Laravel Push Notification with Firebase 重定向Firebase推送通知 - Redirect Firebase Push notification Firebase 网络推送通知 - Firebase Web Push notification iOS Firebase 推送通知:如何提供 Firebase 用户的设备令牌并发送通知 - iOS Firebase Push Notifications : How To Give Firebase User's Device Token And Send Notification
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM