Getting a device's push notification channels
I am not understanding something, I guess.
When the device is ready, I want to send a query to find out what channels the device is subscribed to. I tried using this: http://docs.appery.io/documentation/b... but I'm having trouble.
I am using the URL https://api.appery.io/rest/push/reg/201.... (my deviceId at the end)
I set up the proper request parameters - X-Appery-App-id and deviceId.
When I test it with the test button, it does work.
I set up a mapping. I get the deviceId with the Javascript:
var deviceID = localStorage.getItem('pushNotificationDeviceID');
return encodeURIComponent(deviceID);
I invoke the service on deviceReady. But nothing happens. I am testing on an iPhone.
What I don't understand is why I have to put the deviceID in the URL. Why isn't it enough to send it as a parameter? If I have to put it in the URL, how do I set that dynamically from the device?