<WP8 Developing Learning Notes > getting the most common models for phones (such as Lumia920, not RM-822)

Source: Internet
Author: User

Before the WP7 era can use the API to get WP phone models such as lumia510, but to the WP8 after the API can only get hardware version number such as RM-822, this model allows us to more detailed understanding of the specific hardware version, such as Ching and Hong Kong, the device version number is different (but I do not remember the ╮ (╯-╰) ╭), a support 4G, one does not support, but the model is Lumia920, this may be the consideration of Microsoft.

But when we only want to use the mobile phone model, we find that there is no API, it is really troublesome.

I found a mobile phone model converter on GitHub, Phonenameresolver, address https://github.com/Aureate-Sunshine/PhoneNameResolver

It can translate the device version number into a common model.

Using this function, the acquired vendor and device version number is passed in to get a Canonicalphonename object,

 Public Static Canonicalphonename Resolve (stringstring model)

This object contains the following properties

 Public classCanonicalphonename { Public stringReportedmanufacturer {Get;Set; }  Public stringReportedmodel {Get;Set; }  Public stringCanonicalmanufacturer {Get;Set; }  Public stringCanonicalmodel {Get;Set; }  Public stringComments {Get;Set; }  Public BOOLisresolved {Get;Set; }  Public stringFullcanonicalname {Get{returnCanonicalmanufacturer +" "+Canonicalmodel;} } } 

To show a model like lumia920, get his Canonicalmodel , and Fullcanonicalname is the full model of the Nokia Lumia 920.

<wp8 Develop learning notes > Get phone's common models (such as Lumia920, not RM-822)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.