Android 11 通知抽屉中的每个应用的通知限制降至 24 [英] Notification limit dropped to 24 per app in Android 11 notification drawer

查看:61
本文介绍了Android 11 通知抽屉中的每个应用的通知限制降至 24的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android 应用程序可以显示的通知数量有限制吗?我在收到 24 条通知后遇到了一个问题,android 通知没有出现.

Is there any limit on the number of notifications the android app can display? I am facing an issue after 24 notifications android notification does not appear.

没有明确说明这一点的文件.

There is no documentation which states this clearly.

我在 Android 11 中观察到这个问题.看起来这适用于 android 10 (https://support.google.com/pixelphone/thread/23619509?hl=en).我没有 android 10.所以,我没有测试过.

This issue I have observed in Android 11. Looks like this is applicable to android 10 (https://support.google.com/pixelphone/thread/23619509?hl=en). I don't have android 10. So, I have not tested.

请帮助我获取有关此限制的文档参考,或者可以使用设备设置更改此行为.

Please help me to get a documentation reference for this limit or this behavior can be changed using the settings of the device.

推荐答案

是的,每个应用可以发布的通知数量是有限制的.有趣的是这个数字不是固定的,可以由设备制造商控制.根据我的观察,与 OnePlus 6T 一样,Google Pixel 3A 手机的通知限制为 25,而三星设备的通知限制为 50.

Yes, there is a limit of notifications that can be posted per app. The interesting thing was the number is not fixed and can be controlled by the Device Manufacturer. From my observation, a Google Pixel 3A phone had limited to 25 notifications were as an OnePlus 6T and a Samsung device had limited the notifications to 50.

如果我们仔细观察 NotificationManagerService.java 源码,我们可以看到一个变量MAX_PACKAGE_COUNT声明为50.

If we carefully observe the NotificationManagerService.java source code, we can see a variable MAX_PACKAGE_COUNT declared to be 50.

code,它检查计数是否大于MAX_PACKAGE_NOTIFICATIONS,它有一条消息说Package has.已经发布了最大吐司.不显示了!"这就是我们受到每个应用发布的通知数量限制的原因.

And inside the code, it checks if the count is greater than the MAX_PACKAGE_NOTIFICATIONS, it has a message saying that "Package has. already posted max toasts. Not showing more!" This is the reason we get limited by the number of notifications that are posted per app.

这篇关于Android 11 通知抽屉中的每个应用的通知限制降至 24的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆