PrepAway - Latest Free Exam Questions & Answers

How should you complete the code?

DRAG DROP
You are developing a Universal Windows Platform (UWP) app named App1.
App1 can be started by using Cortana. To start the app, users must be able to say “App1 play my music” or “App1 play music”.
You need to write the Voice Command Definition (VCD) file to meet the requirement.
How should you complete the code? Tо answer, drag the appropriate code elements to the correct targets. Each element may be used once, more than once, or not
at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
To specify where the app name can be spoken in the voice command.
The ListenFor element has a RequireAppName attribute that specifies where the app name can appear in the voice command. The BeforePhrase indicates that
users must say your app name before the command phrase.
Example: Here, Cortana listens for “Adventure Works when is my trip to Las Vegas”.
<ListenFor RequireAppName=”BeforePhrase”> when is [my] trip to {destination} </ListenFor>

https://msdn.microsoft.com/en-us/library/windows/apps/mt185616.aspx

One Comment on “How should you complete the code?

  1. Herbert says:

    Since “App1 play my music” and “App1 play music” should work, the correct content of the ListenFor element is “play [my] music” instead of “play my music”.

    “Use brackets around a word or words that are optional. That is, the word or words can be spoken, but are not necessary for a match. For example, [Show] {options}.”
    From: https://docs.microsoft.com/en-us/uwp/schemas/voicecommands/voice-command-elements-and-attributes-1-2




    0



    0

Leave a Reply