I'm working on a media app, and I'd like to improve its Siri interactions. I've implemented an Intents extension, with "radio" as the media category, and I'm refining the resolveMediaItems
method. Typically if I tell Siri Play <search query> in <my app>
, and then examine the INPlayMediaIntent
in the debugger, I see something like this
<INPlayMediaIntent: 0x143f181c0> {
playShuffled = 0;
mediaSearch = <INMediaSearch: 0x143d19b50> {
reference = 0;
mediaType = 18;
sortOrder = 0;
albumName = <null>;
mediaName = search query;
genreNames = (
);
artistName = <null>;
moodNames = (
);
releaseDate = <null>;
mediaIdentifier = <null>;
};
mediaContainer = <null>;
playbackRepeatMode = none;
mediaItems = <null>;
resumePlayback = 0;
playbackQueueLocation = now;
playbackSpeed = <null>;
}
where the mediaSearch.mediaName
has the data from the speaker that I can use to resolve the query.
Unfortunately, if the query contains the words 'music' or 'radio' these will not be included in the mediaName
field. If the query contains just these words, e.g., "Play music in <my app>"
, the field will be <null>
and the INPlayMediaIntent
will effectively contain no content whatsoever.
Given the content that app provides, knowing whether the terms 'music' and 'radio' were used are absolutely necessary for sensibly resolving the query. Can anyone provide guidance on how I can get these terms to be visible within the INPlayMediaIntent
object?