Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle to the application opened via notification? #8

Open
yakupbaser opened this issue Jan 28, 2021 · 1 comment
Open

handle to the application opened via notification? #8

yakupbaser opened this issue Jan 28, 2021 · 1 comment

Comments

@yakupbaser
Copy link

yakupbaser commented Jan 28, 2021

how can i handle this? i started foreground service. And i terminated the app with sliding sideways. (app is still running in memory). When i clicked to notification, the app is openning. But how do I know if I opened the application via notification?

i need to learn that the app opened first or opened via notification. So i need two answers as like that messages:

the app says: I opened for the first time.
or
the app says: im coming from notification tapped, I was already working in background before.

@yakupbaser
Copy link
Author

yakupbaser commented Jan 29, 2021

i need that in notification of flutter_foreground_service_plugin:

Future selectNotification(String payload) async {
if (payload != null) {
debugPrint('notification payload: $payload');
}
await Navigator.push(
context,
MaterialPageRoute(builder: (context) => SecondScreen(payload)),
);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant