简体   繁体   中英

How can I dynamically clear custom VCD commands from Cortana?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM