Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Fetch device and hardware feature information in Windows Phone
This article explains how to get device details including firmware version, name etc. in Windows Phone.
Device information and capabilities
To get device details first you need to add namespace Microsoft.Phone.Info into your project. This namespace contains four classes to explore device specification namely
- DeviceExtendedProperties - get general device information
- DeviceStatus - get general device information
- MediaCapabilities - get device media capabilities
- UserExtendedProperties - get anonymous identifier for device's user.
For example, see the following code:
private void btnok_Click(object sender, RoutedEventArgs e)
string deviceDetails = "Device details are::";
deviceDetails += DeviceStatus.ApplicationCurrentMemoryUsage +",";
deviceDetails += DeviceStatus.ApplicationMemoryUsageLimit + ",";
deviceDetails += DeviceStatus.ApplicationPeakMemoryUsage + ",";
deviceDetails += DeviceStatus.DeviceFirmwareVersion + ",";
deviceDetails += DeviceStatus.DeviceHardwareVersion + ",";
deviceDetails += DeviceStatus.DeviceManufacturer + ",";
deviceDetails += DeviceStatus.DeviceName + ",";
deviceDetails += DeviceStatus.DeviceTotalMemory + ",";
deviceDetails += DeviceStatus.PowerSource;
//to know whether device supports smooth streaming of multi resolution video
Hardware feature detection
Windows Phone 8 provides some new devices (like NFC) and APIs for device detection. You'll find coverage in the Nokia Lumia Developer's Library:
- How to check availability of features at runtime gives code for device detection on both Windows Phone 7 and Windows Phone 8.
- How to check characteristics of hardware features gives code to check screen resolution and available RAM size.
- demo project exists that shows the hardware features of the device it's running on. This can be used as a good starting point for your own detection routines.