Problem with SubscribeChannel and UnsubscribeChannel services
Hello,
I'm following the "sending push notifications to a device" and "sending push notifications from 3rd party apps" tutorials and I have succeded in completing both. Services work ok, test works fine and I can suscribe and unsubscribe from test services. I manage the subscription states with a GetChannels services.
My problem is the following:
I want a toggle control, e.g., when value changes, call to subscribe or unsubscribe services:
if (Appery('mobiletoggle_31').val()=="on"){
localStorage.setItem("recibirAvisos", "on");
rsSubscribeUser.execute();
}else{
localStorage.setItem("recibirAvisos", "off");
rsUnsubscribeUser.execute();
}
rsSubscribeUser and rsUnsubscribeUser are datasources that call to SubscribeChannels and UnsubscribeChannel respectively.
When debugging the application in browser I receive a 400 Bad Request error (see attached image) with this response:
{"code":"PNSI007","description":"Serializationerror"}
and the device not is subscribe to channel:
[
{
"id":2080,
"name":"channel1",
"subscribed":false
}
]
Any ideas?
Thanks in advance.