How can I dynamically clear custom VCD commands from Cortana?

55 views Asked by At

I've got a UWP app with a VCD where I can get Cortana to recognise my test command (so working). However, I'd like to be able to tidy up all custom commands (ideally by identifying appname/command prefix and command, failing that by wiping an appname/command prefix completely, failing that wiping all custom commands).

Here's my working VCD:

<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
  <CommandSet xml:lang="en-gb" Name="VoiceDemoCommandSet_en-us">
        <AppName>Do</AppName>
        <Example>Placeholder</Example>

        <Command Name="Test">
            <Example>a test</Example>
            <ListenFor RequireAppName="BeforePhrase">a test</ListenFor>
            <Feedback>You've triggered the test command</Feedback>
            <Navigate />
        </Command>
  </CommandSet>
</VoiceCommands>

For example, how can I clear the registered "Do a Test" command?

1

There are 1 answers

0
Nico Zhu On BEST ANSWER

How can I dynamically clear custom VCD commands from Cortana?

Derive from official document, VoiceCommandDefinitionManager only contains InstallCommandDefinitionsFromStorageFileAsync, and there is no such api could uninstall installed command file. I'm afraid you can't remove installed command file, if you do want this feature, please post your requirement with windows feed back hub app.