我希望用户能够在Windows10搜索框中输入产品id,让它显示网络数据库中的产品列表,然后当他们点击该产品id时,让它从我们的内部网加载一个网页。这个是可能的吗?我是否需要在计算机上安装一个桌面应用程序,以便Cortana进行搜索?
发布于 2015-10-29 05:49:27
您需要使用VCD文件创建一个UWP应用程序,您需要在其中设置Cortana如何调用您的应用程序。如果您应用程序名为"find it“或其他名称,那么您可以告诉cortana,每当有人在其搜索框中说或键入"find it”时,“她”必须调用您的应用程序,并将"find it“后面的内容作为参数。
if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.voiceCommand) {
var speechRecognitionResult = eventObject.detail.result;
// Get the name of the voice command.
// For this example, we declare only one command.
var voiceCommandName = speechRecognitionResult.rulePath[0];
// Get the actual text spoken.
var textSpoken = speechRecognitionResult.text !== undefined ? speechRecognitionResult.text : "EXCEPTION";https://stackoverflow.com/questions/33399940
复制相似问题