×
Namespaces

Variants
Actions
Revision as of 04:21, 16 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Fetch device and hardware feature information in Windows Phone

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to get device details including firmware version, name etc. in Windows Phone.

SignpostIcon XAML 40.png
WP Metro Icon WP8.png
SignpostIcon WP7 70px.png
Article Metadata
Tested with
SDK: Windows Phone SDK 7.5
CompatibilityArticle
Created: mandardac (31 Jul 2012)
Updated: influencer (15 Jul 2013)
Last edited: hamishwillee (16 Jul 2013)

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

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;
 
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");
}
 
}


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:

This page was last modified on 16 July 2013, at 04:21.
201 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×