Skip to content
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

Closed
jeffersonmello opened this issue Feb 22, 2021 · 12 comments
Closed

Comments

@jeffersonmello
Copy link

jeffersonmello commented Feb 22, 2021

Its possible setNotificationReceivedHandler work in background?

@LuisGrt
Copy link

LuisGrt commented Feb 27, 2021

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.

@jeffersonmello
Copy link
Author

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

@AkashMi5
Copy link

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.

@jeffersonmello
Copy link
Author

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 :)

@LuisGrt
Copy link

LuisGrt commented Mar 12, 2021

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.

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.

@jeffersonmello
Copy link
Author

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.

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?

@AkashMi5
Copy link

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.

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 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.

@AkashMi5
Copy link

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.

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.

notification1
notification2
notifications3

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?

@AkashMi5
Copy link

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.

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.

notification1
notification2
notifications3

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?

@jeffersonmello
Copy link
Author

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.

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.

notification1
notification2
notifications3
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

@AkashMi5
Copy link

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.

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.

notification1
notification2
notifications3
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?

@emawby
Copy link
Contributor

emawby commented Jan 30, 2024

Closing issue as stale. If this is still happening in 2024 feel free to tag me to reopen

@emawby emawby closed this as completed Jan 30, 2024
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

4 participants