Adding Cortana to your UWP App with Visual Studio 2015
With Visual Studio 2015 now available and today being the start of the Windows 10 release wave and Cortana being just so cool, this post from Arun Kumar Surya Prakash is a perfect for today...
Microsoft has introduced Cortana in 2014 Build Event. With just one year now Cortana has become one of the best personal assistance. Initially using Cortana the user can activate systems commands, but now using Cortana the user can activate any applications either by foreground or background voice command. In this blogs let’s see how to launch the universal windows app using Cortana.
Let’s understand what is foreground and back ground voice commands, in foreground voice command the application will be launched by the Cortana. Where as in background voice command the Cortana activates the background task of the application and the results are populated in the Cortana’s
Foreground Voice Command Architecture
Step 1: VCD (Voice Command Definition) is an XML file which contains all the Commands to activate the app. When the app run by the user in the foreground, then the VCD file gets installed in the Cortana.
Step 2: User can use any command defined in the VCD file to launch the App.
Step 3, 4 ,5 6 : The speech spoken by the user is sent to Windows Speech platform and Microsoft Speech Recognition service in cloud, together they identify what the user has tried to said.
Step 7: Now Cortana receives the text said by the user and decides which application has to be launched and passes the recognized string to the application OnActivated event.
To make this happen the three important steps
- Create the voice commands in the VCD (Voice Command Definition) file
- Then Register the VCD XML file on Application starts
- Then handle the voice command on the App Activation
That’s our Application is integrated with the Cortana. We can launch our app using the voice commands.
In my next blog let’s see how to integrate the Cortana to the background task.
For the source, click through and grab the zip and you're good to go!
This conversation has been locked by the site admins. No new comments can be made.