Repository navigation
Notification keeps spinning after inline Reply — how to dismiss it or stop the spinner? #7058
Replies: 1 comment 1 reply
|
The spinner is Android waiting for the app to confirm the reply. After an inline reply, Android keeps the notification alive (its flags show Fix: in async def handle_action(e: ftn.NotificationActionEvent):
if e.action_id == "reply" and e.id is not None:
# Confirms the reply to Android and stops the spinner.
await notifications.show(
id=e.id, title="Ada", body=f"You: {e.input}", payload=e.payload
)
...That replaces the reply UI with your updated text, like chat apps showing your sent message. If you'd rather the notification disappear completely, cancel it after the update, with a short pause so the update lands first: await notifications.show(id=e.id, title="Ada", body="Sent", payload=e.payload)
await asyncio.sleep(0.5)
await notifications.cancel(e.id)I tested all of this on an Android 16 emulator with flet 1.1.2 / flet-notifications 1.1.2:
I've also opened #7060, which fixes the "Action buttons and replies" example and adds this to the If this fixes it for you, please Mark as answer so others with the same problem can find it. Thanks! |

The spinner is Android waiting for the app to confirm the reply. After an inline reply, Android keeps the notification alive (its flags show
LIFETIME_EXTENDED_BY_DIRECT_REPLY) until the app posts an update to the same notification id. Until thencancel()is ignored, bothcancel_notification=Trueand a manualnotifications.cancel(id), which is why the example gets stuck. It's Android's documented flow (Retrieve the user reply), and theflutter_local_notificationsmaintainer confirms it in MaikuB/flutter_local_notifications#2620.Fix: in
on_action, callshow()again with the same id (e.id):