Hello all,
I am creating a cooking app, where I use pushnotifications to remind the user as soon as there is a new step (even if the app has been closed in the meantime). Sometimes the time between two steps is very long, so the user might close the app while waiting for the new step. I have already created pushnotifications with OneSignal, but these only work when the app is working in the backround. I’ve searched for this topic before, but none of the solutions I’ve read helped me with my app. Does anybody know how I can create a pushnotification while the app is still running, but which will be displayed after a individually chosen period of time?
Thanks for the fast reply, I have already tested this extension before, but as the founder says, it doesn’t work on API26+. Is there maybe a way, to create/use a clock which turns on as son as the app is closed, so that this clock could then
trigger the pushnotification instead?
No. As Kodular apps do not run in background, we can not do that now. There’s an option to use One signal component which will send the notification even when app is not running in the background.
Also, if you want to create notification when the app is running, you can use Firebase and Notification component, but remember one thing that if you will use Firebase with Notification component, you won’t be able to send notification when app will be closed.
Ok thanks. I’ve already created the construction with OneSignal and Firebase. My Problem is, that I don’t know how I can trigger the “pushnotification-send” event. For that, I’ve used a clock, but as you know, the clock won’t run in the backround. Am I able to send a value to firebase, so that firebase will trigger the pushnotification in OneSignal after a periode of time, which will be defined by the value ?
Use Firebase DB data changed block, so whenever the data will be changed, it’ll send notification to the user.
Ok, I understood.
But than I didn’t got my delayed pushnotification, did I?
Hello everybody. It’s been a longtime since I miss this forum. I disclose the code for this extension on appybuilder a couple of years ago, as I can remember. So you can get the code and patch it with the modification needed to make it comply with android API >26. I think that is only a matter of introducing channels in notification cycle, it should not be impossible.
Unfortunately this is not the only issue.
Since Android Oreo API26, Android has added a bunch of restrictions to BroadcastReceivers.
The Alarm requires the Receiver and I believe it will now require a Service to run properly.
Push notification not received in background in API above 7 so In phone settings go to security and privacy > permission management > auto start and enable your app for background activation. And done you will receive push notifications when app is not running at any time if problem is not solve pm me
Thanks, but my Problem isn’t the sending of pushnotification while app is not running
(that works fine). This pushnotification just doesn’t work, because the timer doesn’t trigger it, when the app is closed.
Hello, thanks for your response.
I didn’t really understand how this extenssion could also be used for Android API>26.
You will not get delayed notification. But you can control the notification by yourself.
How do you meen?
I mean you can change the data in firebase db and user will get the notification.
At OneSignal you can select the day and time you want the notifications to be sent.
You can choose to have the message sent instantly when it is delivered (the first option in the image) or you can let OneSignal choose when to send the message to the users, it does it within 24 hours…
Thank you. Is there a way to select the day and the time of the notification with kodular so that these values can be defined in kodular?
Thanks, that makes sense. But I think with this methode, I wouldn’t have delayed notification either, because this event will be directly triggered, when there is a new value in the db. (Sorry for the bad Englisch by the way​)
Hey I just found a way.
Do as follows:
After the data changed in the Firebase db, enable the clock component with the time interval of your choice. After the clock will reach that certain time, app will trigger the notification and in this way user will receive the delayed notification.
That sounds very promising!
I will definetely try this out, thanks.