VCDファイルUWP installCommandDefinitionsFromStorageFileAsyncインストールすることはできません。私は私のアプリ(WinjsとUWP)にコルタナを統合するが、私はVCDファイルをインストールしようとすると、私はそのエラーだ
Status is 'error', but getResults did not return an error
main.jsを(コードは上のラップされていますアプリケーションの起動ハンドライベント):
wap.current.installedLocation.getFileAsync("Commands.xml").then(function (file) {
return voiceCommandManager.installCommandDefinitionsFromStorageFileAsync(file);
}, function (er) {
console.error('error file Commands.xml', er);
}).then(function() {
var language = window.navigator.userLanguage || window.navigator.language;
var commandSetName = "BibleCommandSet_" + language.toLowerCase();
if (voiceCommandManager.installedCommandDefinitions.hasKey(commandSetName)) {
var vcd = voiceCommandManager.installedCommandDefinitions.lookup(commandSetName);
} else {
console.log('VCD not installed yet?');
}
}, function (ee) {
console.error("installCommandDefinitionsFromStorageFileAsync error", ee);
});
Commands.xml:
<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
<CommandSet xml:lang="en-us" Name="BibleCommandSet_en-us">
<AppName> Bible </AppName>
<Example> Go to genesis 1,9 </Example>
<Command Name="goToQuote">
<Example> Go to genesis 1,9 </Example>
<ListenFor RequireAppName="BeforeOrAfterPhrase"> show {book} {number}</ListenFor>
<ListenFor RequireAppName="BeforeOrAfterPhrase"> show {book} {number}{number}</ListenFor>
...
<ListenFor RequireAppName="BeforeOrAfterPhrase"> open {book} {number}{number},{number}{number}</ListenFor>
<Feedback> Ok i'm opening {book} </Feedback>
<Navigate/>
</Command>
</CommandSet>
修正:をファイルの別の行に、私は別のコマンドセットを持っていると私はPhraseList「ブック」と呼んでいたましたが、本当の名前は「リブロ」だった
ありがとうサンテーンあなたは私にアイデアを与えた – JorgeCapillo