![]() ![]() If I click on the Resistor app, the phone shows a list of valid example commands. My Electronic Resistance Calculator is available – you can see in the screenshot below that the word “Open” as an example voice command is visible. When I activate Cortana, I can click on the hamburger menu and select Help in the top left to see the list of apps which are controlled by voice commands. I added the VCD ResistorCommands.xml file to the root of the Electronic Resistance Calculator project, and I added the code snippet above to, and ran this in debug mode on my Nokia 1520 Windows 10 device. New)Īt this point, we actually have enough code to allow us to ask Cortana to start our app. Protected override async void OnNavigatedTo( NavigationEventArgs e) InstallCommandDefinitionsFromStorageFileAsync(storageFile) GetFileFromApplicationUriAsync( new Uri( "ms-appx:///ResistorCommands.xml ")) Īwait VoiceCommandDefinitionManager. private async Task AddVoiceCommandDefinitionsAsync() We need to add those definitions at application start up, which we can do by overriding the OnNavigatedTo method in. It’s very straightforward to get the Voice Command Definition file from application storage, and then install this storage file into the VoiceCommandDefinitionManager. The Windows 10 VoiceCommandDefinitionManager is the resource that Cortana uses when trying to interpret the voice commands. Resistor Open Open Open You got it! Resistor Open Open Open I'm on it! Adding these voice commands to the Device Definition Manager I’ve added the file below – which I’ve named ‘ResistorCommands.xml’ – to the root of this directory. The app I’ve modified is my Electronic Resistance Calculator. Navigate: This is the XAML page that Cortana navigates to when it parses what you’ve said.Feedback: This is what Cortana replies with.ListenFor: These are the words Cortana listens for. ![]() Example: Windows shows examples for each individual command, and this node is where we can specify the examples. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |