UWP开发-获取设备唯一ID

EasClientDeviceInformation deviceInfo = new EasClientDeviceInformation();

this.showDeviceInfo.Items.Add("设备友好名称:" + deviceInfo.FriendlyName);
this.showDeviceInfo.Items.Add("设备标识符:" + deviceInfo.Id);
this.showDeviceInfo.Items.Add("设备操作系统:" + deviceInfo.OperatingSystem);
this.showDeviceInfo.Items.Add("设备固件版本:" + deviceInfo.SystemFirmwareVersion);
this.showDeviceInfo.Items.Add("设备硬件版本:" + deviceInfo.SystemHardwareVersion);
this.showDeviceInfo.Items.Add("设备制造商:" + deviceInfo.SystemManufacturer);
this.showDeviceInfo.Items.Add("设备系统产品:" + deviceInfo.SystemProductName);
this.showDeviceInfo.Items.Add("设备SKU:" + deviceInfo.SystemSku); 

 

如需要详细到设备每个模块的信息使用:

System.Text.StringBuilder sb = new System.Text.StringBuilder();
Windows.Devices.Enumeration.DeviceInformationCollection dc = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync();

foreach (Windows.Devices.Enumeration.DeviceInformation item in dc)
{
    sb.Append(item.Name + ":\t" + item.Id + "\r\n");
} 

 

posted @ 2016-05-24 13:18  时嬴政  阅读(1329)  评论(0编辑  收藏  举报