O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required