How to Determine Windows Phone OS Version - windows-phone-8

I need to determine whether the user has 8 or 8.1 on their device. What is the best way to accomplish this? The exact version number is of no concern, I just need to know if they've upgraded their OS so I can know whether to include some new 8.1 features or not.

Use Environment.OSVersion.Version. It returns the version of the OS. Note that for WP 8.1 the version is actually 8.10.
You can check if the phone is updated to WP 8.1 like this:
if (Environment.OSVersion.Version >= new Version(8, 10)) {
// The user is using WP 8.1 or later
}

Related

I am working on windows phone 8.1 application and want to know that is it possible to get sim number programatically in wp 8.1 app?

I want to retrive sim number from wp 8.1 application . is it possible with current SDk? or is it possible in windows 10 SDK?
I don't know if it's possible or not but maybe not since all the applications such as what's app or truecaller let the user input the number by himself.
and I think it would be much easier to use the same trick if it fits your application.

Smaato requires location capability for Windows phone 8.0

I integrated Smaato in my Windows phone 8 app and it seems that it requires the location capability, something that I don't want to add to my app. Is there a way to avoid adding the capability and still use Smaato?
/thanks!
There are 2 versions of the Windows Phone 8 SDK for Smaato. One requires/uses location and one doesn't.
You'll find the one which doesn't need the location capability at https://downloads.smaato.com/windows/Smaato%20SDK%20for%20WP8%20-%20V1.5.0.6%20no%20location.zip

Windows Phone Installer For MobileFirst Application Center

i have uploaded the windows phone installer (Mordor.xap) in my application center console,
but when i tried to access the installers.html, i only got installers for ios and ipad. There is no installer for windows phone.
My question :
why my windows phone device cannot detect the installer?
For the token, do i must copied manually on my device?
About question 1: Same situation as in this question.
You are running into an incompatibility that was recently introduced by Windows Phone 8.1 Update 1.
This problem was fixed by an ifix. Depending on your version, you need the following ifix:
7.0.0.x: IF20150407-1506
6.3.0.x: IF20150403-1749
6.2.0.x: IF20150407-0051
6.1.0.x: IF20150407-0051
Note that the first 8 digits of the ifix are a date. Any ifix with a later date is also ok. Ifixes can be obtained from https://www-933.ibm.com/support/fixcentral/
See also http://www-01.ibm.com/support/docview.wss?uid=swg1PI36918
About question 2: If you talk about the Application Enrollment Token (AET), please follow the instructions found here.

EventHandlerList does not exist on Windows Phone

i bumped into issue when I wanted to use EventHandlerList in Windows Phone application. Errro occured telling me it was not found even though msdn claims it is supposed to exist on WP platform. http://msdn.microsoft.com/pl-pl/library/system.componentmodel.eventhandlerlist%28v=vs.110%29.aspx Do you happen to know what I;m doing wrong?
The link you provided does not mention support of Windows Phone anywhere in the documentation.
Please be aware that Windows Phone 8 uses a subset of the .NET 4.5 framework, so not everything is present.

CurrentApp.ReportConsumableFulfillmentAsync vs CurrentApp.ReportProductFulfillment

I have to implement "in-app purchase" both for Windows 8.1 and Windows Phone 8 app. The API looks the same for both platforms, besides one method: "CurrentApp.ReportProductFulfillment" (only WP has it). However, both platforms have "CurrentApp.ReportConsumableFulfillmentAsync".
My preference is to write fully reusable code (same code) for both platforms, if possible. MSDN documentation is not clear enough, so I want to understand:
Can I use ReportConsumableFulfillmentAsync on WP instead of ReportProductFulfillment? Are they have the same functionality? (maybe they left ReportProductFulfillment for backward compatibility).
Do I have to call ReportConsumableFulfillmentAsync after buying consumable only, or after every store purchase?
Thanks!
According to MSDN ReportConsumableFulfillmentAsync is Windows Phone 8.1 API, so you cannot use it when creating Windows Phone 8 apps. Stick with ReportProductFulfillment and Windows Phone 8 apps for now, it will take some time for Windows Phone 8.1 to get on the market
Only for consumables
If your are looking or a nice in-app wrapper, take a look at this https://github.com/igorkulman/Kulman.WP8/blob/master/Kulman.WP8/Services/WindowsPhoneStoreService.cs