Open noinskit opened 1 year ago
Yep be open to a PR on this and if it's specific to Android then it should be specific to the Android implementaiton of the plugin. From my understanding, this is only possible on Android like you said as the callback on iOS/macOS that takes place before a notification is shown only triggers when the app is in the foreground (see https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/1649518-usernotificationcenter)
Are there any updates on this? I have not been able to find any PR related to this. Are we still not able to be aware of when a notification is shown to the user, regardless of it beeing tapped or not? Both for android and iOS
@MaikuB Why is this not possible in iOS , since firebase also has a similar callback and it gets triggered in background in iOS
@Gaurav-CareMonitor Firebase deals with push notifications not local notifications so you're not doing a direct comparison. If you want to know then you should look at the notification APIs to understand how they work and the capabilities they expose
Is any work being done on this already? Would be great to have for android. Dunno if I could make time to implement it myself anytime soon since I'm unfamiliar with this codebase.
Now that the plugin is open to running Flutter code in the background, what about optionally firing a callback when a scheduled notification is shown to the user? I think it's only doable on Android, so it would probably be an optional callback in
AndroidInitializationSettings
, with similar restrictions asonDidReceiveBackgroundNotificationResponse
ininitialize()
.If the idea sounds reasonable, I might be able to prepare a merge request on my own.