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

User is not navigated to news tab on clicking the notification (Special case when app is minimizes and last used tab is not news tab) #129

Open
aravinth9019 opened this issue Mar 22, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@aravinth9019
Copy link
Collaborator

Steps to reproduce:

Open the app

  1. Navigate to any tab other than news tab
  2. Minimize the app (Do not close the app)
  3. Trigger a new news item from back-end
  4. Click on the notification received
  5. Verify if the user is navigated to the news tab

Expected result:
On clicking the notification user should be navigated to the news tab

Actual result:
User is navigated to last used screen ( As per the test case it is not the news tab)

@aravinth9019 aravinth9019 added the bug Something isn't working label Mar 22, 2020
@aravinth9019
Copy link
Collaborator Author

Comment from @dewmal in issue # 128

Handling app on background seems like an issue

https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages

The Dart VM does not run while the app is in the background. That means you have to handle notifications and data messages in native code (Java/Kotlin/ObjectiveC/Swift).

To do this on Android, refer to the official documentation.

You will probably have to remove the firebase_messaging plugin and do all the message handling manually. To send the notification content to your flutter app (while it is in foreground), use platform channels.

It really helps to look at the source code of the firebase_messaging plugin to see what happens on the native side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant