I’d like to use some wp8-specific apis but I don’t want to drop support for wp7 in my app.
In particular, I’d like to do the following:
if(isWindowsPhone8OrNewer)
{
var sp = new SpeechSynthesizer();
sp.SpeakTextAsync("test");
}
What is the best way to access the wp8 api and not have to maintain two separate versions of the app?
For example, do I need to use reflection?
Can someone please provide an example?
Many thanks!
swine
The answer to the question is simple: Simply don’t upgrade your app to using the WP8, and you’ll be free to continue maintaining your WP7 app using the WP8 SDK in VS2012.
If you want to split up your application, and start utilizing the new UI features such as the native LongListSelector, you would want to separate your UI and view logic (ViewModels, etc.) into separate assemblies.