Related browse

The related browse action allows listeners to browse your service for music related to the current item. The following shows an example in the Info View of a related browse action.

Related browse

The following steps describe how to implement the related browse action:

  1. Define the text string in your strings.xml file that is to display in the Info View of the Sonos app. (“Related Songs”).

  1. When the listener selects the ellipsis (…) to see the Info View, Sonos sends your service a getExtendedMetadata request. This example is for a track itemType.

  1. Include all the custom action items for the Info View in your getExtendedMetadata response. To simplify this example we’ll show a related browse custom action.

  1. Note the following about relatedBrowse:
    Element Description
    id The value related-t:123456 identifies the service’s tracks related to the current track, t:123456. The pattern of these IDs is up to you.
    type The value RELATED_SONGS corresponds to the stringId value in the strings.xml file above.
  2. When a listener chooses a relatedBrowse action, the Sonos app sends a getMetadata request to your service using the given related browse id (related-t:123456).
  3. Your service should respond to getMetadata with a mediaCollection of related songs.