DeviceExtendedProperties Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Allows an application to obtain information about the device on which it is running.

Inheritance Hierarchy

System..::.Object
  Microsoft.Phone.Info..::.DeviceExtendedProperties

Namespace:  Microsoft.Phone.Info
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public NotInheritable Class DeviceExtendedProperties
public static class DeviceExtendedProperties

The DeviceExtendedProperties type exposes the following members.

Methods

  Name Description
GetValue Retrieves an object representing the specified device property.
TryGetValue Retrieves an object representing the specified device property.

Top

Remarks

Warning

In Windows Phone OS 7.0, this class was used to query device-specific properties. In Windows Phone OS 7.1, most of the properties in DeviceExtendedProperties were deprecated, and the new DeviceStatus class should be used instead. However, where appropriate, you can still use any of the below properties that are not deprecated.

The following table lists the available properties that can be queried using this method.

Property name

Value type

Description

ApplicationCurrentMemoryUsage

A long integer.

The current application’s memory usage in bytes.

This property is deprecated. Use the ApplicationCurrentMemoryUsage property instead.

ApplicationPeakMemoryUsage

A long integer.

The current application's peak memory usage in bytes.

This property is deprecated. Use the ApplicationPeakMemoryUsage property instead.

ApplicationWorkingSetLimit

A long integer.

The working set limit in bytes.

This property applies to Windows Phone OS 7.1 only.

This property is deprecated. Use the ApplicationMemoryUsageLimit or AppMemoryUsageLimit property instead.

DeviceFirmwareVersion

A string.

The firmware version running on the device. This is not the same as the OS version, which can be retrieved using System..::.Environment. We recommend that the value be a string that can be parsed as a System..::.Version structure and that it be incremented in a logical manner as newer firmware is installed, but this is not required. This value may be empty.

This property is deprecated. Use the DeviceFirmwareVersion property instead.

DeviceHardwareVersion

A string.

The hardware version running of the device. This is not the same as the OS version, which can be retrieved using System..::.Environment. We recommend that the value be a string that can be parsed as a System..::.Version structure and that it be incremented in a logical manner as newer hardware is released, but this is not required. This value may be empty.

This property is deprecated. Use the DeviceHardwareVersion property instead.

DeviceManufacturer

A string. 256 characters maximum.

The name of the manufacturer of the device. There is no standard format for this string. We recommend that the same value be used by every device from a manufacturer, but this is not enforced. This value may be empty.

This property is deprecated. Use the DeviceManufacturer property instead.

DeviceName

A string. 256 characters maximum.

The name of the device. There is no standard format for this string. This value may be empty.

This property is deprecated. Use the DeviceName property instead.

DeviceTotalMemory

A long integer.

The physical RAM size of the device in bytes. This value will be less than the actual amount of device memory, but can be used for determining memory consumption requirements.

This property is deprecated. Use the DeviceTotalMemory property instead.

DeviceUniqueId

A byte array. 20 bytes in length.

A unique hash for the device.

  • For Windows Phone 8 apps running on Windows Phone 8 devices and later, the DeviceUniqueId value is unique per device and per app publisher. For Windows Phone 8 apps, DeviceUniqueId is functionally identical to the HostInformationPublisherHostId()()() property in the Windows Runtime.

  • For Windows Phone OS 7.1 apps running on Windows Phone 8 devices, the DeviceUniqueId value is unique per device.

This value is constant and does not change if the phone is updated with a new version of the operating system.

Don’t use DeviceUniqueId in your apps to identify users. The device ID remains unchanged even if ownership of the device is transferred.

IsApplicationPreInstalled

A Boolean value.

Indicates whether the app was pre-installed with the device image. Apps that are downloaded from the Windows Phone Store always return a value of false.

OriginalMobileOperatorName

A string.

A string that represents the mobile operator's name.

PhysicalScreenResolution

Size

A Size value containing the height and width of the device’s screen.

RawDpiX

Double

A Double containing the raw number of pixels along the horizontal axis of the screen; when this value is not available, it returns 0.0

RawDpiY

Double

A Double containing the raw number of pixels along the vertical axis of the screen; when this value is not available, it returns 0.0

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_IDENTITY_DEVICE

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Phone.Info Namespace