Isaack Hussein
Isaack Hussein

Reputation: 29

C# UWP How to enable Cortana Checking conditions and responds back to you

Hey guys I have a simple UWP app that I have integrated with Cortana. So I am looking for a post or a sample codes where when am going to tell cortana, "Hey Cortana check the available jobs" then before it checks it says "which one a or b " then I say a.

When I says a, it reads the title of that job Note: Not the one I have provided on the feedback XML file.

Thanks.

Upvotes: 0

Views: 67

Answers (1)

Breeze Liu - MSFT
Breeze Liu - MSFT

Reputation: 3808

You can try and test the official CortanaVoiceCommand sample, if you can define the voice command and the corresponding response correctly, you can achieve it.

There is a similar scenario in the official sample, when we say "cancel trip to london", the cortana will filter the trip of going to london, then give you a response to ask you whether you want to cancel it, then you can say "yes" or "No" to confirm.

For the code, you can see the voiceCommandService background task, it has different behavior to handle the different command.

Moreover, you can also look into the document: https://learn.microsoft.com/en-us/cortana/voice-commands/interact-with-a-background-app-in-cortana#span-idhand-offscreenspanspan-idhand-offscreenspanspan-idhand-offscreenspanhand-off-screen

Upvotes: 1

Related Questions