apsun / NekoSMS

A pattern-based text message blocker for Android.
GNU General Public License v3.0
417 stars 44 forks source link

NekoSMS的通知单条独立显示,数量多时会占满全部通知区域 #72

Closed Hovn closed 4 years ago

Hovn commented 4 years ago

问题描述: 注意到0.17.0的更新日志中提到移除了通知组的支持,从该版本之后, 当拦截通知过多的话,NekoSMS的通知都是单条独立显示,会占满全部通知区域。 而Android N之后,对于大于等于4条的通知系统会自动进行收拢,但对于NekoSMS并不会。

解决方案: 检查代码,并进行尝试后,解决方案很简单: 注释掉NotificationHelper.java的如下代码行: .setGroup(NOTIFICATION_GROUP)
变为 //.setGroup(NOTIFICATION_GROUP) 问题即可解决,此时,NekoSMS的通知在大于等于4条的时候会自动收拢。 希望能接收此修改建议 :-)

If you are submitting a bug report and do not include the following info, your issue will be ignored!

Please paste your Xposed logs (Xposed Installer -> Logs -> Menu -> Save to SD card) below:

none

Thank you for helping us help you help us all.

apsun commented 4 years ago

Wait this should not be the case, setGroup should immediately group them.

Let me see why it's not working... I can also reproduce this.

apsun commented 4 years ago

Well that's nice. The Android documentation is wrong, we need to manually create the summary notification. I disabled summary notifications in 0.17 because at the time I was using Pushbullet, and it would always mirror the summary notification instead of the individual one. It also caused all kinds of problems on Android 4.4-6.0 because they don't support group notifications.

We could add a version check and only create the group summary on Android N+, but I would still need to generate the text for the group summary, which I really don't have time to figure out how to do correctly. So for now, I think the easiest course of action is to just remove setGroup, and maybe revisit this in the future if people care.