Skip to content

App Reloads on Notification Click in Foreground #146

@bschlie

Description

@bschlie

When a notification is clicked while the app is already in the foreground, the app seems to reload. Specifically, I observe that "LaunchedEffectApp is called" reappears in the log. This behavior complicates navigation that relies on payload data from notifications. I am looking for ways to prevent this unnecessary reload.

KMPNotifier and Kotlin version:
kmpnotifier version: 1.6.0, kotlin version: 2.2.0

Steps to reproduce the bug:

  1. Run the sample project in this repository on an Android device.
  2. Trigger a notification
  3. Click the notification while the app is in the foreground.
  4. Inspect the logs. Note that "LaunchedEffectApp is called" appears after the "Notification clicked" log entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions