[OneSignal Plugin] Onesignal send push to user without login

[OneSignal Plugin] Onesignal send push to user without login

  
Forge Component
(9)
Published on 19 Oct by OutSystems R&D
9 votes
Published on 19 Oct by OutSystems R&D

Hi to all,

When I send a notification to all or to userid, but this user not is loged, the device does not recive push notification.

My temporal solution was a table that when user login i check if this user open notification, but i suppose that onesignal should send notification when the user loged or turn on his device like whatsapp or facebook. 

Onesignal has this feature?


Thank so much.

Hi Alberto,

The OneSignal has different Register actions. You could use register instead registerWithUser, and your device will not require someone to be logged to send push.

Check where you are registering the onesignal. If you did it after the login , so your app will be enable to receive push just after that. The best place to put it could be on splash or onAPplicationStart/onApplicationResume actions.  So it will be independent of the login screen


Best Regards

Fabio Fantato


Fábio Fantato wrote:

Hi Alberto,

The OneSignal has different Register actions. You could use register instead registerWithUser, and your device will not require someone to be logged to send push.

Check where you are registering the onesignal. If you did it after the login , so your app will be enable to receive push just after that. The best place to put it could be on splash or onAPplicationStart/onApplicationResume actions.  So it will be independent of the login screen


Best Regards

Fabio Fantato


Hi Fabio,

But the notifications are configured for each user. For example, if a user X login to app, he receive his notification, and after X logout and Y login in the same device, Y must received his notification.


Thank you.


Now I see your point. In fact you are need to be sure that message will be received. So, if your user are not logged, when he logs into the app, all queued messages should be displayed. Is right?

I guess the currently api does not support this. I was searching in the onesignal api and I don´t know if the ttl parameter could be a solution for that:

ttl :  Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days).

Max value to set is 2419200 seconds (28 days).

https://documentation.onesignal.com/reference#create-notification 

Maybe you can try customize one signal plugin to send ttl info.

Fábio Fantato wrote:

Now I see your point. In fact you are need to be sure that message will be received. So, if your user are not logged, when he logs into the app, all queued messages should be displayed. Is right?

I guess the currently api does not support this. I was searching in the onesignal api and I don´t know if the ttl parameter could be a solution for that:

ttl :  Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days).

Max value to set is 2419200 seconds (28 days).

https://documentation.onesignal.com/reference#create-notification 

Maybe you can try customize one signal plugin to send ttl info.

Ok Fabio, Thank so much! I will try it!