I need to show push notifications messages on a message list in a view currently opened. This messages must be shown automatically and in realtime meaning if I receive a push notification it is immediately shown in the view whitout user manual refresh.
I have a message view and a message provider.
The provider keeps listening on push notification events. When the provider receives an notification it call a callback function, which is an method of the message view, passing the new message so it can be shown in this view. The message is put in a array inside the view which is binded to the layout of the view.
The problem is that the new messages, received by the callback are not shown in the view.
I know the callback is beind called because I put a log in this callback. This logs prints the message and it is there. The binding is also correct because I load messages saved on database before that array and they are shown in the view and also because if I put an message created on the view it self, not received from push, in the array it is rendered in the view.
There is also an input to send messages. If I click in this input and close the keyboard the view is updated and the new messages shown.
My question is why are not my push messages beinge rendered and how could I make they be rendered?