By using the Microsoft.Phone.Info.DeviceStatus class, we can get some information about the device, such as the device manufacturer, the device name, and so on. The name of the device can be obtained through Microsoft.Phone.Info.DeviceStatus.DeviceName, but this name is usually not the device name that we are familiar with, but the device identity name. For example: Lumia520, through the above interface to obtain the device identification is "rm-914_apac_prc_227", we are more familiar with the "Lumia520", and for direct access through the interface "rm-914_apac_prc_227" is indeed very unfamiliar, If you need to display the device name in our program, then we need to display a name like "Lumia520" instead of a string that is obtained directly from the API. Then you need a conversion interface to convert the strings acquired by the API into familiar device names.
There is a great God abroad has encapsulated such a conversion interface, interface name and: Phonenameresolver (Https://github.com/ailon/PhoneNameResolver). You can download your child's shoes on your own, just import the PhoneNameResolver.cs file into your existing project. Use the sample code as follows:
Looking at the code of the Phonenameresolver class, this interface maintains a corresponding relational table, and when a new device is released, the foreign god will update the interface, which means that the project using this interface needs to be updated synchronously, otherwise there will be a problem with the name of the new device.