Unable to get OneSignal subscription data at first start

Hi guys, I don’t know if it is a bug or it’s a normal behaviour, but it prevents me to do what I want.
The problem is that when I launch my app, the blocks for getting data about OneSignal subscription don’t work. The event GotAvailableTags doesn’t raise.
The odd (at least for me) thing is that if I open another screen and then come back to Screen1, it works and provides me all data.
But it’s not usable in this way; I have even tried to reopen Screen1 (very poor solution) in the Screen1.Inizialize event and it doesn’t work.
Hope you can help me

Put the subscription blocks in a proceedure, or in a clock function and not in the Screen1.initialize . You can call the function from the screen1.initilize

That should fix it.

1 Like

Thanks for the reply. I have already tried it. I put the Get Available Tags method in an image click event, to be sure that it’s executed after all the initialization process, but it doesn’t work as well.
To be more precise, if I click the image the result is an empty string, but if I put the app in the background and then resume it, the result label now is automatically filled with the data (without clicking the image again), as if the Got Available Tags event was still waiting for an answer.

Hmmm. Give me an hour and I will try to build a small app and crereate the issue

1 Like

can u show blocks.
i will try to help you…


Sorry, but I can’t show you the entire screen. I think this one should be an easy function, and shouldn’t interact badly with the other blocks. Maybe if someone had examples of a good usage of these OneSignal blocks could provide me them. But it’s strange that in particular conditions (when resuming the screen or coming back from another screen) they work good.

there is a block called “set subscription=true” you only need that to register the device and it is working fine for me

Do you think? Consider that the device I am testing the app from is subscribed for month and notifications are working properly
I have the suspect that it’s a problem of syncronous/asyncronous executions, but I’m really ignorant in this aspect.
EDIT: btw, i have tried it (I’m trying everything :dizzy_face:) but the issue persists.