Hardware problems
Namespace needs to be introduced: using Microsoft. Phone. Info;
Information name |
Get code |
Data Type |
Remarks |
Device manufacturer |
Devicestatus. devicemanufacturer |
String, less than 256 characters in length |
It can also be obtained using deviceextendedproperties. getvalue ("devicemanufacturer"). tostring (), but is not recommended. |
Device Name |
Devicestatus. devicename |
String, less than 256 characters in length |
It can also be obtained using deviceextendedproperties. getvalue ("devicename"). tostring (), but is not recommended. |
Unique device ID |
Deviceextendedproperties. getvalue ("deviceuniqueid ") |
Byte [] (array length less than 20) |
|
Device firmware version |
Devicestatus. devicefirmwareversion |
String |
It can also be obtained using deviceextendedproperties. getvalue ("devicefirmwareversion"). tostring (), but is not recommended. |
Device hardware version |
Devicestatus. devicehardwareversion |
String |
It can also be obtained using deviceextendedproperties. getvalue ("devicehardwareversion"). tostring (), but is not recommended. |
Total device memory size |
Devicestatus. devicetotalmemory |
Long |
It can also be obtained using deviceextendedproperties. getvalue ("devicetotalmemory"), but is not recommended. |
Memory size in use by the application |
Devicestatus. applicationcurrentmemoryusage |
Long |
It can also be obtained using deviceextendedproperties. getvalue ("applicationcurrentmemoryusage"), but is not recommended. |
Maximum memory size used by applications |
Devicestatus. applicationpeakmemoryusage |
Long |
It can also be obtained using deviceextendedproperties. getvalue ("applicationpeakmemoryusage"), but is not recommended. |
|
|
|
|
See http://msdn.microsoft.com/zh-cn/library/microsoft.phone.info.deviceextendedproperties for details
Screen Resolution (this is currently 480*800 ):
Screen width (double) system. Windows. application. Current. Host. content. actualwidth
Screen height (double) system. Windows. application. Current. Host. content. actualheight
Operating system version:
System. environment. osversion. tostring ()