Bug 438781 - Updating notification silently on Android makes them pop up on desktop
Summary: Updating notification silently on Android makes them pop up on desktop
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (other bugs)
Version First Reported In: unspecified
Platform: Other Android 11.x
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-17 00:39 UTC by s
Modified: 2023-10-12 18:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description s 2021-06-17 00:39:41 UTC
When a notification is silently updated on Android, it appears on the desktop 
as a new notification.

STEPS TO REPRODUCE

1. on Android 11, open People¹, say “hi” to Cat, minimize app
2. when Cat says “Meow”, press the “open bubble” button in the notification

¹ https://github.com/android/user-interface-samples/tree/main/People

OBSERVED RESULT

The same notification appears on desktop twice. (Opening a bubble results in a 
notification being reposted with setOnlyAlertOnce(true), among other things.)

EXPECTED RESULT

The notification does not pop up on desktop or make sound

SOFTWARE/OS VERSIONS
Windows: 2004 (19041.1052)
Android: 11, LineageOs 18.1; also reported on Android 6
App: 1.17.0 (org.kde.kdeconnect_tp)

ADDITIONAL INFORMATION

There are some ways you can update a notification silently:

* post a notification with flag FLAG_ONLY_ALERT_ONCE, that is normally set 
  by calling setOnlyAlertOnce(true). If the notification already exists, 
  it is updated silently; otherwise, it pops up according to its
  notification channel settings. This is the most “standard” way of
  updating notifications silently on Android, but some app, especially
  those targeting older Android versions, can choose the method below,
  as it allows posting *new* notifications silently.

* post to a notification channel with low importance (< IMPORTANCE_HIGH), 
  no sound or vibration, etc. Telegram, WhatsApp use this.

* before Android O (< API 26), don't set high priority (> PRIORITY_HIGH),
  sound or lights
Comment 1 Unknown 2023-10-12 18:03:24 UTC
I'll second this,

Android 13 (Pixel 7)
Spotify persistent media notification updates get pinged on Windows 10 desktop every few seconds.