Skip to content

[question]: Can we trigger Dart code when a background notification is received? #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
Kimsoer opened this issue Mar 23, 2025 · 0 comments
Open
1 task done

Comments

@Kimsoer
Copy link

Kimsoer commented Mar 23, 2025

How can we help?

Dear OneSignal Team,

I’m using the OneSignal Flutter SDK (onesignal_flutter) in my app, and I have a specific use case where I need to trigger Dart code when a background notification is received. Currently, I understand that background notifications are handled natively by the OS, and there’s no direct way to execute Dart code when the app is in the background.

Is there any way to achieve this? For example:

Can we use data-only notifications to trigger Dart code in the background?

Is there a way to wake up the Dart isolate or execute custom logic when a background notification is received?

Are there any plans to support this feature in the future?

My use case involves displaying multiple local notifications when a background notification is received. I’d appreciate any guidance or workarounds you can provide.

Thank you!

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant