[OneSignal Plugin] One Signal, How it works?

[OneSignal Plugin] One Signal, How it works?

  
Forge Component
(5)
Published on 12 Jan by OutSystems R&D
5 votes
Published on 12 Jan by OutSystems R&D

Hi there,

I am trying this plug in and finally got the message sent from OneSignal. However, i still do not understand the behavior. 

1. I register to one signal in OnApplicationReady. What does this client action want to say?

2. If i install in my mobile device and then i push nottification from One signal then there is no notification.

3. If then i open the application, then it can receive the notification. However, if i do not open the application for some minutes, the notification seems to be waived out (lost).

4. If i open the application and send push notification from OneSignal, indeed the notification will be received.

Thank you.

regards,

indra 

Hello, Indra,

From your description, I guess you asked the right question up front: The Register action is used to, aptly, register your device with your OneSignal account (and application).

As such, it makes sense that on 2 you don't yet receive the notification, since the device was never registered in the service. If you had opened the application once and closed it immediately afterwards, the device would be registered and you would receive the push notification.

By now, you should also see why you received the notification on 3 and 4.

Let us know if you have further questions.

Best regards,

Carlos Simões

Hi Carlos,

Thank you for quick reply.

I am still confused, when i open the application for the first time, the device (and also the application with same name i register) is registered. How if i open the application again, is it registered again? as the logic is on ApplicationReady to  register to OneSignal:

Then i uninstall the application, then reinstall back the application, but not open the application. Then i push notification from Onesignal, but the notification won't be received?

- one time, i saw a notification before i open the application

- other time, i do not see notification .. and the notification that is sent before is lost.

regards,

indra 

Solution

Well, if you are calling the Register action on the Application Ready system event handler, it will be executed once the app is opened the first time.

However, if you open the app from background, I believe it may not be executed (it depends on the device resources).

Having said this, the Application Ready system event is triggered on every app open, not on the first app open after the installation. Was this how you expected the event to work?

Regarding the second scenario: haven't confirmed this, but is it possible that there is a different identifier on each new installation, even on the same device?

If so, if you install and reinstall the app, the new installation would've never have registered their identifier with the OneSignal service and, as such, not receive notifications (either from the new or older identifier).

Does this explain your scenarios?

Best regards,

Carlos Simões

Solution

hi Carlos,

yes, it is correct that the Application Ready system event is triggered on every app open, not on the first app open after the installation. Was this how you expected the event to work?

I only follow the instruction from https://success.outsystems.com/Documentation/Development_FAQs/How_to_Use_Push_Notifications_with_OneSignal

and it says:

I think when it is the same registration, it will be discarded.


Regarding the second scenario: haven't confirmed this, but is it possible that there is a different identifier on each new installation, even on the same device?

I try many times, and once got no recipients:

So, i am thinking to conclude that it is a 3-tuple {DeviceID, App ID, and different identifier - as your term}.

Thank you,

regards,

indra