Replied Persistent Notification Not Cleared
See original GitHub issueHome 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
After sending clear_notification
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:
- Created 9 months ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
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?
Nope, if you remove the call to cancel the notification (
onComplete()
) it will keep spinning.