Namespaces
Variants
Actions

Fetch device details in windows phone

Jump to: navigation, search

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

Needs-update.png
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:
  • 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.
MultiMediaTile.png
SignpostIcon Code 52.png
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");
}
 
}
This page was last modified on 6 May 2013, at 13:59.
138 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved