22

In Windows Phone 8 Silverlight I use

 Environment.OSVersion.ToString()

to get Windows Phone version and

DeviceStatus.DeviceManufacturer+" "+DeviceStatus.DeviceName

to get device name.

These APIs no longer work with Windows Phone 8.1 XAML. I have found

Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation()

this seems to return the manufacturer and device name but OS is returned as just "Windows Phone".

Is there a way to get the exact Windows phone version?

Igor Kulman
  • 16,211
  • 10
  • 57
  • 118
  • From what I've read, getting the version does not seem to be possible. May I ask why do you need it? – yasen Jun 09 '14 at 14:13
  • The documentation http://msdn.microsoft.com/en-us/library/system.environment.osversion(v=vs.110).aspx and http://msdn.microsoft.com/EN-US/library/windowsphone/develop/microsoft.phone.info.devicestatus.devicemanufacturer(v=vs.105).aspx says that it is supported in Windows Phone 8.1 XAML. – cvraman Jun 09 '14 at 14:13
  • @yasen for an API call, they use it for some analytics – Igor Kulman Jun 09 '14 at 14:17
  • @cvraman works with 8.1 Silverlight but not 8.1 XAML – Igor Kulman Jun 09 '14 at 14:17
  • Did you ask the people with the API about this? They might have some idea. Also, for now you could just pass 8.1. Yeah, that's not a real solution, but I don't know if such exists. – yasen Jun 09 '14 at 15:05

3 Answers3

5

This is currently not possible In Windows Runtime 8.1 (Phone and Windows). It does look like it might be planned thanks to Morten Nielsen and Pete Brown

EDIT: This is now possible in Windows 10. See this SO answer as well as this article for more useful features.

Community
  • 1
  • 1
Shawn Kendrot
  • 12,425
  • 1
  • 25
  • 41
  • and what about http://stackoverflow.com/a/24929167/429521 ? shouldn't I use that? – Felipe Sabino Sep 24 '14 at 20:06
  • Firmware version is not OS version. There are many different version for a particular OS. While The main OS is 8.1, the actual version used depends on what updates MS or the carrier has pushed out. – Shawn Kendrot Oct 06 '14 at 19:24
2

For 8.1, you can use this project on Github https://github.com/Microsoft/phone-info that includes an example application for retrieving both static and dynamic properties of a Windows Phone device.

For Windows 10, the APIs that were used to gather these data on (8 and 8.1) have changed. I have found one blog post https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/ for someone who has created a helper class that retrieves the following properties from a Windows 10 UWP app

current OS family - phone/desktop/...

current OS build number - 10.0.10240.16413

current OS architecture - x86/x64/ARM

current App Display Name

current App Version - 3.0.2.0

current Device manufacturer - Nokia

current Device model - Lumia 1520

In his post he shows how to get basic data about current device, operating system and application.

give it a try maybe it helps

Rami Sarieddine
  • 5,396
  • 35
  • 41
1

In Windows Phone 8.1:

Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation().FriendlyName

It worked for me!

LarsTech
  • 80,625
  • 14
  • 153
  • 225
Toni Moreno
  • 351
  • 1
  • 3
  • 8