Obviously I know it will return htc but is it caps or lower case? I recently had a user of one of my apps tell me one of the functions crashed his phone so I want to exclude that function from htc devices for the time being based on what I get from Build.MANUFACTURER and also Build.VERSION.SDK_INT. I just have no idea what will return from Build.MANUFACTURER on an htc device or other devices for that matter. Does anyone know of a list somewhere that would have all that type of info?
Share
Please see this link for a list of manufacturers.
Here is how I detect whether or not a device is manufactured by HTC. Note that I don’t care whether or not it matches HTC or htc exactly, I toLower() it and check to see if Build.MANUFACTURER CONTAINS htc at all.
EDIT (almost two years later) – modified code and added TVK’s recommendation:
Shortened return statement, added Local.ENGLISH to .toLowerCase as recommended by Lint.