I really love it, if the implementation of rich user functions is easy – and the addition of voice command support for a Windows Phone 8 app is very easy.
With Windows Phone 8 you can add additional startup commands for your app which can be used to deep link in your app functions (see details here: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206959(v=vs.105).aspx)
In my WorkTime app I want to have a new voice command “WorkTime add entry”.
What are the necessary steps?
Adding a new Voice Command Definition file to the project. I used two CommandSets for each supported language.
After that you have to enable the following capabilities in the AppManifest.xml
In the constructor of the App or your start page it is necessary to tell Windows Phone that your app supports new voice commands, which are defined in your added Voice Command Definition file (VoiceCommandDefinitionWorkTime.xml in my case)
The last step is to check on the start page or your target page (see Voice Command Definition file) if the user starts the app by this command. You can do this by overriding the OnNavigatedTo event:
The result is that your app will now support a command “NewEntry” which will be executed if the user presses the Windows button for a few seconds and speaks:
“WorkTime add new entry” or “WorkTime new” or “WorkTime add a new entry”