I have installed mango SDK in my machine and I want to create an application which runs on both Windows Phone OS 7.0 and Windows Phone OS 7.5 devices. Also I need to implement many of the mango features in the same application. Is it possible ? if yes please tell me how to do the version checking, because based on the version we need to implement the mango features.
相关问题
- An error is occur when we use navigation to move o
- Custom number picker?
- binding font-awesome character in XAML to Text
- Conditional compilation based on functionality in
- Windows Phone 7 call ASMX web service
相关文章
- Working with hmacsha256 in windows store app
- WP7 Alert dialog
- Add Service Reference and Add Web Reference?
- Scrollviewer & SIP Issue (WP7.5 Mango)
- Will visual studio 2015 projects and solutions be
- Database for Windows Phone 7 [closed]
- Windows phone 7: how to post tweet to twitter
- How to Play youtube videos in windows phone 7?
You'll have to maintain two different versions. You can't compile one XAP that supports both versions at the same time.
The Mango APIs are only available when compiling with the 7.1 SDK. And as such, you can't do in-line checking in the code.
But it's rather pointless, as there's almost no users left that haven't upgraded to Mango, and all new phones ship with Mango.
Now days all the Windows phone are shipping with the Wp7.5 mango version also Older devices are getting mango updates, so it looks pointless in targeting only few WP7.0 running phones.
But if you dont need to anything SDK related api access then you can do this bifurcation.
However You can find the solution to the finding the OS version is in [my answer of same kind of question here.]1
You can do this using the Type class and reflection, although the process will not be easy. Create a Windows Phone 7.0 application, and then create a MangoExtensions class which implements the mango specific features:
http://www.sharpgis.net/post/2011/08/21/Windows-Phone-Adding-Mango-features-to-a-70-WinPhone-App.aspx