HTML/JavaScript/CSS로 Cortana 응용 프로그램을 개발하고 싶습니다. 아쉽게도 documentation pertaining to Cortana apps은 모두 C#/XAML 용으로 작성되었습니다.JavaScript로 Cortana 앱을 개발하려면 어떻게해야합니까?
0
A
답변
0
Cortana와 통합하려면 Cortana와 통합되는 "App Service"를 제공하는 UWP (Universal Windows Platform) 응용 프로그램을 개발해야합니다.
Visual Studio 2015 (또는 Visual Studio 15)에서 JavaScript 프로젝트 템플릿 "빈 응용 프로그램 (유니버설 Windows)"을 사용하여 새 프로젝트를 만듭니다. 태그 Application
를 가진 요소를 찾아 자식 요소로 다음을 추가
<Extensions>
<!-- Provide a hook for Cortana to ask your app questions -->
<uap:Extension Category="windows.appService" StartPage="voiceCommandService.js">
<uap:AppService Name="AdventureWorksVoiceCommandService"/>
</uap:Extension>
<!-- Enable deep linking into your app from Cortana -->
<uap:Extension Category="windows.personalAssistantLaunch"/>
</Extensions>
파일 voiceCommandService.js
는 마이크로 소프트 코타나에 대한 진입 점 역할을합니다. Cortana가 앱에 요청을 넘겨 줄 때마다 실행되어 Windows.UI.WebUI.WebUIBackgroundTaskInstance.current
에서 작업 세부 정보를 가져올 수 있습니다.
나머지는 C# 문서를 참조하십시오.
대답은 this Cortana sample을 기반으로합니다.