-
Notifications
You must be signed in to change notification settings - Fork 218
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
Its possible setNotificationReceivedHandler work in background? #352
Comments
I tried to do this as well in one of my projects. After some research, I managed setting up the Service Extensions for both platforms. |
Thanks for you reply, then i need write code native for Android and for iOS |
Hi, I am trying to get One Signal notifications in background using Service Extensions link you have shared from One Signal documentation, however, without success. Could you provide native code for Android and iOS if it is possible for you. |
Yes sure, but dont have the code for iOS, only for Android, when iOS code fineshed i post in this the issue, if someone have code for iOS please share with us :) |
Sure, but that will depend on what do you want to do with the notification. For example I am storing it right after on a SQLite database. I don't know what functionality you want to give to your application. I was having the issue that the notification was lost if the app was in background or not even running and the user dismiss the notification alert. I needed a way to catch it and storing no matter if the app is running or not. |
I need this, i need save my notification in sqlite db used in sqfentity on flutter, you have code saving in sqlite for ios? |
I am also storing the received notifications in sqlite, it is working perfectly fine when app is open or just closed but when I swipe away the app from recent apps, it does not work. Notification sent from the One Signal does not come in the sqlite db and we lose it forever. |
In the main.dart file, in the setNotificationReceivedHandler I am calling the function to insertOrUpdate function on the database on receiving the notification. How I can call this from native android? |
@jeffersonmello Can you help with this for the android? |
I need finish my solution complety in android native, when finished, i post in this issue |
Hi brother, any luck with it? |
Closing issue as stale. If this is still happening in 2024 feel free to tag me to reopen |
Its possible setNotificationReceivedHandler work in background?
The text was updated successfully, but these errors were encountered: