question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replied Persistent Notification Not Cleared

See original GitHub issue

Home Assistant Android version: 2022.11.0-full

Android version: 13

Phone model: Pixel 6

Home Assistant version: 2022.12.4

Last working Home Assistant release (if known):

Description of problem: Can not clear a persistent notification that has been replied. After replying there is a spinning loading symbol seemingly indefinitely. Then When I call clear_notification that symbol disappears and the reply shows inline. Calling clear_notification a second time does not do anything.

Call to create notification:

service: notify.mobile_app_amos_phone
data:
  message: Alarm
  data:
    tag: alarm
    persistent: true
    sticky: true
    actions:
      - action: REPLY
        title: Disarm with Pin

Call to clear notification:

service: notify.mobile_app_amos_phone
data:
  message: clear_notification
  data:
    tag: alarm

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):

12-13 23:10:31.934 32095 32111 E BLASTBufferQueue: [VRI[SettingsActivity]#2](f:0,a:3) Faking releaseBufferCallback from transactionCompleteCallback
12-13 23:10:36.687 32095 32420 W FirebaseMessaging: Unable to log event: analytics library is missing
12-13 23:10:36.687 32095 32420 D FCMService: From: 331041709873
12-13 23:10:36.689 32095 32095 D MessagingService: Creating notification with following data: {sticky=true, tag=alarm, persistent=true, message=Alarm, action_1_title=Disarm with Pin, action_1_key=REPLY}
12-13 23:10:36.693 32095 32095 D MessagingService: Show notification with tag "alarm" and id "92895825"

...

12-13 23:10:51.274 32095 32129 E BLASTBufferQueue: [VRI[WebViewActivity]#3](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback
12-13 23:10:51.280 32095 32125 D NotifManagerCompat: Cancel notification with tag "null" and id "-1"
12-13 23:10:51.281 32095 32125 D NotifManagerCompat: Check if the notification is in a group...
12-13 23:10:51.281 32095 32125 D NotifManagerCompat: Notification is not in a group. Cancel notification...
12-13 23:10:51.292 32095 32129 E BLASTBufferQueue: [VRI[WebViewActivity]#3](f:0,a:4) Faking releaseBufferCallback from transactionCompleteCallback

Screenshot of problem:

After submitting reply image

After sending clear_notification image

Additional information:

If I have not replied to the notification, clearing works correctly.

Also if I send a new notification with the same tag it is replaced correctly.

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jpelgromcommented, Dec 19, 2022

I managed to change the code so that it updates the notification on reply instead of asking the system to remove it (which it doesn’t), which allows you to update/cancel it after entering a response like expected.

The only regression I’ve found is that it will now only show the latest reply, instead of x replies (the system decides how many to show, 1 to 3 in my testing). Would that create problems or be considered a breaking change?

1reaction
jpelgromcommented, Dec 14, 2022

confirmed to the user that it sent with its own update

Nope, if you remove the call to cancel the notification (onComplete()) it will keep spinning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't clear persistent notification from Google that says ...
I have a notification from Google that says 'Downloading'. When I try to find what specifically is showing it, it says Data Download ......
Read more >
Team Tab Showing Persistent Notification
Now, I have a persistent notification that there's a mention for myself or my team and I'm unable to have it be cleared....
Read more >
MyDataManager persistent notification keeps disappearing
I have my data manager set up to show persistent notification. Since oreo the notification keeps disappearing after a few minutes. I then...
Read more >
Is there a way to have notifications stay on lock screen like iOS ...
After opening the screen, notifications will disappear from the lock screen, but have you tried swiping down the notification screen to view ...
Read more >
Solved: Can't clear notifications (RESOLVED) - Fitbit Community
Our team is aware of this ongoing problem and working on a permanent fix. ... How can I clear the notification panel on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found