Fetch device details in windows phone
This article explains how to get device details including firmware version, name etc. in Windows Phone.
This article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.
Reasons: hamishwillee (22 Apr 2013)
Article needs:
Reasons: hamishwillee (22 Apr 2013)
Article needs:
- Links to API reference and other guide material
- Verification that it works for WP8
- Ideally some test code which prints out the results.
- More detailed overview on what else can be obtained from the system.
Article Metadata
Tested with
SDK: Windows Phone SDK 7.5
Compatibility
Platform(s): Windows Phone 7.1
Article
Created: mandardac
(31 Jul 2012)
Last edited: hamishwillee
(06 May 2013)
Introduction
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, DeviceStatus, MediaCapabilities and UserExtendedProperties.
please refer 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;
MessageBox.Show(deviceDetails);
//to know whether device supports smooth streaming of multi resolution video
if (MediaCapabilities.IsMultiResolutionVideoSupported)
{
MessageBox.Show("Supported");
}
else
{
MessageBox.Show("Not supported");
}
}


(no comments yet)