Closed trysandayou closed 1 year ago
Now I know that the issue is complex. What I did in my flutter code is...
The main issue is that Salesforce SDK doesn't show the head message by itself.
And also, this is important, Salesforce doesn't track open the push message or not.
Needless to say, the setAnalyticsEnabled(true) is set (SDK's default)
What is the main issue for this?
Now I understand the situation.
I needed to implement handler for Android. And now my app can show push message from SMC.
Just a log for future user like me:
Thank you for this plugin!
I am having trouble integrating this plugin with FCM. Maybe i'm missing something but don't i need do set the fcm token somehow on the salesforce? I found no method to do that.
Hi @trysandayou. Did you solve the issue of displaying the Android notification when app is in background. As you mentioned MC notifications are just data messages, so Android does not display them onto the notification tray. I'm struggling with that, any clue?
One possible solution is to receive the notification and display a local notification @alexdriba .
Thanks @rodrigobastosv but not that exactly. I'm looking for solving the issue of SFMC not sending a notification
payload on their Notifications. By not doing that, background notifications on Android are not working as expected.
hi @alexdriba and @rodrigobastosv Yes, I added local notification in my flutter app and Background message is shown correctly.
Just fyi, I used FlutterLocalNotificationsPlugin to implement local notification.
Thank you for your great work.
as is
Push messages from SMC doesn't be shown in Android. Even though push messages from Firebase console is shown as head-up notification. (For iOS, this plugin works fine. Show the push message in head-up notification.)
to be
Push messages from SMC is shown as head-up notification like from firebase console.
logs in console
When got the message from SMC, the following line is shown : D/FLTFireMsgReceiver( 8926): broadcast received for message.
reproduce procedure
Init SMC SDK and setContactKey works fine. SMC show the user with Firebase Token.
Open firebase console by Web browser.
Send test message to flutter application.
Check the head-up notification.
Both foreground / background, message is shown in head-up.
Console log is shown as follows: D/FLTFireMsgReceiver( 8926): broadcast received for message W/FirebaseMessaging( 8926): Missing Default Notification Channel metadata in AndroidManifest. Default value will be used.
Next, open SMC Mobile push page and create message
Send message to flutter application
Nothing happens D/FLTFireMsgReceiver( 8926): broadcast received for messag
Would you please let me know any possible solutions?