Closed gtu-myowin closed 2 years ago
This is something you'd need to debug further within your own app as the plugin as the plugin should only show notification only because when it has been instructed to do so. This means there's either there's an issue within your app you've yet to track down or a compatibility issue with Pusher where it's processing events for notifications created outside of it's library when it shouldn't do so. Note I'm not familiar with Pusher nor do I use it so this would be something you'll need to look further into yourself or get help from others to do so
How do you know if it is in my code? As I mentioned, the endless notification is only happening when I show the notification. But never mind, I will try with another notification package and let you know.
I didn't say there's definitely an issue with your code. I gave what was one of the potential reasons as I won't know what else your app is doing. Commenting out the call to this plugin doesn't mean the issue is to do with this plugin either as I explained with the other potential reason being an issue with pusher itself
Just FYI, I have tested pusher beams thoroughly before integrating with your package. I have used AlertDialog to alert the notification and it worked without any issue. Also, logging the data would only log once before. I am not blaming your code either. I just wanted to notify you about this and expecting some helps from the community but it seems no one is active here. I can totally understand you.
As you're posting on an issues board for this plugin, those that would typically go on here are those who need to do the same thing. Majority of the community is also use to use Firebase Cloud Messaging (FCM) instead of pusher. With that in mind, I'm not surprised with the lack of response. It's not the usual community site so this is why it's better to go to places like Slack, Stack overflow etc.
Note that just because the pusher SDK works fine in isolation doesn't mean there isn't an issue with it either and I had mentioned that it could be the cause. Have you tried to post an issue with pusher though?
Closing this as there's no evidence to point to this being a problem with this plugin. As mentioned in previous post, you should also look into reporting an issue with Pusher
Describe the bug I am using pusher beams to fire event from server and I use flutter local notification to show the notification when the event is received by app.
Sample code to reproduce the problem I have called
initPusherBeams()
in my init state (please read to the end I am quite sure this issues is with flutter local notifications)and then, in
initPusherBeams
function, I haveIf I comment out
flutterLocalNotificationsPlugin.show
, the event fire only once as you can see in below screenshot.but if I uncomment showing notification part which is the following code
The event fire endlessly (like in the screenshot below) and the notification keep appearing for each event continuously.
How come showing notification became some kind of loop and how should I fix this. Thanks in advance.