Hi,
I’m developing an app where I send notifications to users using OneSignal, and it’s working perfectly.
My question is: is there any way to store the notifications I send to users in the app’s local storage, so that when users open the app, they can view past notifications? Also, if there is a Clear option, users should be able to delete the stored notifications.
Please guide me on how to achieve this. Thank you.
I’ll start by saying I’m not an expert in OneSignal , but if there’s no method to retrieve past notifications, the only way is to use iToo so you can receive notifications even when the app is closed, and then add them to the ones already stored in TinyDB.
PS
Please guys, don’t argue .
There are extension developers who aren’t experts in block-based programming and still create complex extensions, just as there are Kodular experts who don’t know how to develop extensions.
It may seem so, but they’re not exactly the same thing.
Correct bro, that’s why you and @Ibrahim_Jamar are my top priority in block based things.
I can develop Extensions because i have to in java but I’m not really expert in Blocking
Btw Big shoutout to both of you guys. And thanks for helping especially you bro @RaYzZz
Due to my experiment there’s no current method to save the notification, you still can’t do this, but why? With the built-in One-signal component there’s no way to retrieve the notification when the notification is coming in.
Then we will create a simple database for storing our notification, Google sheets is enough for this function, so when we send notification to user’s we will store notification to our database, then we will add a notification layout/screen to display all received notification. The problem is that we can’t delete the notification layout value’s because we don’t know which user view or not viewed the notification, maybe you can implement something to handle the view function.
That what i have tried so far and you can give it a try than giving up
Exactly no one is expert than other, thats we have the community where we get hands
It could be done by having the notification generated from our own database, saved there, and then sent to OneSignal for delivery.
Then the user would interact with the database to retrieve the notification history.
Or they could simply be saved locally with TinyDB, but obviously if the device is changed or the app is uninstalled, the data would be lost.
The idea is to create the notification on Firebase or other databases (so it gets saved) >> which then triggers a function (that call OneSignal API) >> an then sends the request to OneSignal to generate the notification.
Good news! I’ve just released a new paid extension that works exactly as my dream “in-app Notification Center” It fetches OneSignal notification history and shows it in a beautiful customizable card UI inside your app – with persistent dismissal (cleared ones stay hidden forever) and title filtering.