Open mhb675 opened 1 month ago
Seconding this! @ben-xD is this package still being maintained? It looks like there hasn't been activity for 6 months.
Me too.
Also, foreground messages aren't received on iOS (but are on Android) Also, the terminated -> notification -> tap data shows on iOS, but on Android it's flakey (doesn't show 100% of the time). Also, the terminated -> notification is delayed by like 20 seconds on Android, whereas iOS is almost instant.
Related open issues:
@ben-xD bump 🙏
@bryantwilliam , I managed to resolve the foreground notification issue on iOS by removing the flutter_local_notifications
setup code from AppDelegate.m
or AppDelegate.swift
(reference: flutter_local_notifications setup).
And for the Android delay issue, it's due to the point mentioned in the README.md:
Warning: In the specific case where your Android app is in the terminated state and a push notification is received, any side effects caused by your handlers must complete before the completing the handler. This is because the Flutter application may be terminated as soon as the Future of the handler completes.
Hey @xbrny, thanks for the reply. Great work with that iOS foreground fix. Regarding the Android delay issues, my handlers only have basic print statements, so no side effects.
Did someone try a background push with a badge count set? like:
"aps": {
"badge": 1,
"content-available": 1
},
This way you could see if the message is received by the device/simulator, when the badge count on the app icon changes. If it does, it is probably an issue with configuring the right delegate methods. If it doesn't, the background push isn't delivered and the issue does not lie on library side.
iOS is not receiving the push notifications with
apns-push-type = background
, it only receives push notifications with theapns-push-type = alert
.Type
alert
payloadType
background
payload