Skip to content

How to use routing when notification tapped when app is on background? #205

Open
@Guervyl

Description

@Guervyl

I have this code in my app component:

// Inside ngOnInit
LocalNotifications.addOnMessageReceivedCallback(data => this._ngZone.run(() => {
        this.handleNotifikasyon()
}, this));
// Insite the class
handleNotifikasyon(): void {
    this.router.navigate(["/the-path"]])
    console.log('handling')
}

When the app is on the foreground and I tap the notification, the router navigates to the path correctly.
But, If I close the app by pressing the back button, and then tap the notification, the app opens, it prints the text handling but it does not navigate to the path.

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