OneSignal-Flutter-SDK icon indicating copy to clipboard operation
OneSignal-Flutter-SDK copied to clipboard

[question]: How can I capture OneSignal notification data when the app is closed (killed state)?

Open denizdurmaz1 opened this issue 9 months ago • 4 comments
trafficstars

Hello I want to capture data and save Hive. When app work and I get notification it work with OneSignal.Notifications.addForegroundWillDisplayListener. But I want to capture data when app closoed and I get data I want to save it to hive I am using Flutter with OneSignal for push notifications. When the app is running (foreground), I can capture notification data using: OneSignal.Notifications.addForegroundWillDisplayListener However, I need to capture notification data even when the app is completely closed (killed state) and save it to Hive. I want to • Receive OneSignal notifications when the app is closed. • Capture notification data (additionalData, collapseKey, etc.). • Save this data to Hive for later use.

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

denizdurmaz1 avatar Feb 06 '25 14:02 denizdurmaz1