I'm in the process of building a Sonos iPhone app with Swift using the Sonos API but have hit a stumbling block. I would like to detect a state / volume / metadata change on my app when someone uses a different app or the hardware buttons. I believe that subscribing to events is the way forward. I have copied in the reference link below.
- Subscribe—Subscribe to group namespaces to receive events when states change, such as changes to volume or playback status.
https://developer.sonos.com/build/direct-control/connect/
I send a HTTP POST to the subscription path as described and get a 200 ok response back but have no idea what to do next. I've been using Xcode and testing with Postman. The callback url is registered on the developer site and OAuth token is verified.
Any help would be greatly appreciated.
Thanks, Paul