Bug 422140

Summary: Annoying and obtrusive notifications KDE connect
Product: [Applications] kdeconnect Reporter: kousik <kousik18>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alex765, bugsKde, kde-bugs, kollix, sephiroth_pk, tdhj744ra03u, tricktown
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=411753
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kousik 2020-05-27 16:59:16 UTC
SUMMARY


STEPS TO REPRODUCE
1. Open whatsapp and ask multiple people to message repeatedly
2. Do not read messages on phone
3. wait

OBSERVED RESULT
After unread messages from 4-5 people with every new message all the unread messages now get notifications and stack up to cover entire height of screen

I get repeated notifications from unread messages, every time a new message is received, its notification as well as all the notifications from previous unread messages, stack up in a column and cover-up 20% of the screen on the right side.

Also sometimes the notification boxes glitch and get stuck never clearing up unless manually closed.



EXPECTED RESULT
Is it possible to display only the latest notification? And the boxes are also huge, is it possible to decrease their size? I know there is an option to log to a file/run a script on receiving notifications. Can I use them to somehow send less obtrusive notifications?

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 20.04
(available in About System)
KDE Plasma Version: Latest(upgrade to 20.04)
KDE Frameworks Version: Latest(upgrade to 20.04)
Qt Version: Latest(upgrade to 20.04)

ADDITIONAL INFORMATION
Comment 1 Simon Redman 2020-06-03 02:57:34 UTC
Hi Kousik,

It sounds like there are three different things here:

- For repeat notifications, probably what you are experiencing is that Android kills our apps' connection when it goes to sleep. There does not appear to be a way to avoid this in modern Android (that we know of). The phone then wakes up when you get a new message, causing KDE Connect to re-initalize, causing all of the notifications to be re-sent.

- For notifications which stack too far up the screen, changing their size, or which fail to disappear on the expected timer, these are Plasma (assuming you are using Plasma) feature requests or issues, so not something which can be handled in KDE Connect

- For your suggestion to display only the latest notification, I think the idea would work in your case (and many others), but I can think of other cases where it would miss out on important information (for instance, maybe your bank tells you every time you make a purchase online and you would like to get an accurate representation of that)
Comment 2 kousik 2020-06-03 07:32:40 UTC
(In reply to Simon Redman from comment #1)
> Hi Kousik,
> 
> It sounds like there are three different things here:
> 
> - For repeat notifications, probably what you are experiencing is that
> Android kills our apps' connection when it goes to sleep. There does not
> appear to be a way to avoid this in modern Android (that we know of). The
> phone then wakes up when you get a new message, causing KDE Connect to
> re-initalize, causing all of the notifications to be re-sent.
> 
> - For notifications which stack too far up the screen, changing their size,
> or which fail to disappear on the expected timer, these are Plasma (assuming
> you are using Plasma) feature requests or issues, so not something which can
> be handled in KDE Connect
> 
> - For your suggestion to display only the latest notification, I think the
> idea would work in your case (and many others), but I can think of other
> cases where it would miss out on important information (for instance, maybe
> your bank tells you every time you make a purchase online and you would like
> to get an accurate representation of that)

I believe the notification display time is set by KDE Connect is there any way I can change that?
So is it possible to enable the latest notification feature for certain apps only? Like WhatsApp messages probably aren't important and I would prefer to see only the latest one.
Comment 3 AmirReza Mohammadi 2021-11-07 16:04:05 UTC
it's better to have one notification box that iterates notification
when I got a new notification all of the notifs are starting to appear but I can't see the latest one.
and when I'm in windows I use 'your phone companion' app of windows it always sends me the exact notification not all of them
Comment 4 Fushan Wen 2021-12-10 12:44:04 UTC
*** Bug 445870 has been marked as a duplicate of this bug. ***
Comment 5 Riccardo Robecchi 2022-01-12 11:23:48 UTC
*** Bug 429721 has been marked as a duplicate of this bug. ***
Comment 6 arne anka 2022-01-12 11:34:16 UTC
What about keeping checksums over the messages, on phone or desktop?
That way KC would know what message has already been displayed and can suppress it the next time.

As for messages like the ones from a bank in #1, I am pretty sure they're never exactly the same.
Comment 7 Martin Koller 2022-01-19 10:35:19 UTC
> The phone then wakes up when you get a new message, causing KDE Connect to
> re-initalize, causing all of the notifications to be re-sent.

This is the main issue. Kdeconnect needs to store information, which notification it has already sent.
Don't know the Android APIs you're using here. Just asking: is there a kind of identification per notification
in Android, which you can store ?
Comment 8 Riccardo Robecchi 2023-01-04 11:49:31 UTC
This really looks like a duplicate of 411753, so I'm marking it as such.

*** This bug has been marked as a duplicate of bug 411753 ***