-
Notifications
You must be signed in to change notification settings - Fork 173
flutter_app_badger cannot update badge on iOS when onBackground #76
Comments
Have you fixed it? can you show me some code for me pls, I have a problem like you. Thanks! |
@raymondk25 @chiennv23 Did you find a way to fix this problem ? |
@KM9668 yes im done, iam using firebase message and push badge in notification json like this: IOS automatic update badge on background. hope u do it! |
@chiennv23 Thanks a lot! |
Hey @chiennv23 could you add more explanation on what you do exactly ? 🙂 |
HI @raymondk25 this seems to be an issue with your background handler not firing instead of the library. Try adding
|
@rohanddave I tried to set contentAvailable: true on iOS, but the app was still not updated when the app was closed. |
@ProFive you need to ensure your background handler function is a static or top level function since flutter runs on an Isolate in the background. Additionally, I would check XCode to ensure |
Hi @rohanddave
AppDelegate |
Hi @ProFive can you try putting |
@ProFive Did you manage to solve the issue? |
I have implemented firebase messaging and I am using this one for notification. My goal is that when receiving a notification sent from firebase in the background or with the app closed, the counter is incremented as the notifications arrive.
My code looks like this :
background or terminated not triggering for me no matter what, only foreground can incremented the badge counter.
The text was updated successfully, but these errors were encountered: