Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

How do i tell if the user open the app by tapping the notification? #176

Closed
liuzhen2008 opened this issue Sep 29, 2015 · 3 comments
Closed

Comments

@liuzhen2008
Copy link

I want to navigate to a specific page when user taps a notification to open the app.

But i don't want to trigger the navigation when user has the app running in foreground.

It seems that the notification callback is fired even when the app is in foreground.. So how do i differentiate between the two situations?

@macdonst
Copy link
Member

@liuzhen2008 when you receive a notification when the app is running the value of data.additionalData.foreground is set to true. When the app is in the background and the user clicks on the notification shade then the value is false when the notification call back is invoked.

@liuzhen2008
Copy link
Author

WOW so awesome!

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants