UWP可获取的设备信息如下:设备名称、设备标识符、设备操作系统、设备固件版本号、设备硬件版本号、设备制造商、设备系统产品、设备SKU等。
后台代码:
public MainPage()
{
this.InitializeComponent();
Test();
}
string info = "设备名称{0}\n设备标识符{1}\n设备操作系统{2}\n设备固件版本号{3}\n设备硬件版本号{4}\n设备制造商{5}\n设备系统产品{6}\n设备SKU{7}\n ";
public void Test()
{
EasClientDeviceInformation deviceInfo = new EasClientDeviceInformation();
tbl.Text= string.Format(info, deviceInfo.FriendlyName,
deviceInfo.Id,
deviceInfo.OperatingSystem,
deviceInfo.SystemFirmwareVersion,
deviceInfo.SystemHardwareVersion,
deviceInfo.SystemManufacturer,
deviceInfo.SystemProductName,
deviceInfo.SystemSku);
}
前台xaml:
欢迎热爱UWP开发的同学加入群IT追梦园:193148992 共同学习交流。