Installing a VCD
Installation of a VCD is done programmatically and can be performed anywhere in your app, as demonstrated in the following example:
string path = "ms-appx:///Speech/VoiceCommands/VoiceCommands.xml";Uri commandFileUri = new Uri(path, UriKind.Absolute);await VoiceCommandService.InstallCommandSetsFromFileAsync(commandFileUri);
The ms-appx:/// prefix represents the install directory of the app. The VoiceCommandService InstallCommandSetsFromFileAsync
method follows the asynchronous pattern, allowing you to wait for the method’s completion without blocking the UI thread.
When the VCD has been installed, the user is then able to launch your app by tapping and holding the hardware Windows button on the device ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.