Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Windows Phone version and device name in Windows Phone 8.1 XAML

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?

like image 615
Igor Kulman Avatar asked Jun 09 '14 14:06

Igor Kulman


3 Answers

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.

like image 90
Shawn Kendrot Avatar answered Nov 19 '22 19:11

Shawn Kendrot


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

like image 26
Rami Sarieddine Avatar answered Nov 19 '22 20:11

Rami Sarieddine


In Windows Phone 8.1:

Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation().FriendlyName

It worked for me!

like image 1
Toni Moreno Avatar answered Nov 19 '22 21:11

Toni Moreno