Skip to content

FirebaseMessaging.onMessageOpenedApp.listen not working #8273

Discussion options

You must be logged in to vote

In my case, the issue was not in the code. The issue was from the server side from where I was receiving notifications in flutter app. I needed to add under given line in the server-side body of the notification.
"click_action": "FLUTTER_NOTIFICATION_CLICK",
and whole code is:
DATA='{ "notification": { "body": "this is a body", "title": "this is a title" }, "data": { "att1": "value..", "att2": "value..", "click_action": "FLUTTER_NOTIFICATION_CLICK", }, "to": "<FCM TOKEN>" }'

and in your manifest just add following code:
<intent-filter> <action android:name="FLUTTER_NOTIFICATION_CLICK" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>

Replies: 14 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Anagha-vk1
Comment options

Comment options

You must be logged in to vote
9 replies
@sahiram036
Comment options

@sakib556
Comment options

@deogratiusmabima
Comment options

@jeffersonDSN
Comment options

@UmairSaqibBhutta
Comment options

Answer selected by UmairSaqibBhutta
Comment options

You must be logged in to vote
1 reply
@Silfalion
Comment options

Comment options

You must be logged in to vote
1 reply
@UmairSaqibBhutta
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet