People have already talked about this issue on How can I find the mobile phone manufacturer using javascript on mobile browser and Detecting device brand
What I need is a javascript library with a much more "muscular" device code library than the current version of platform.js
For instance I have this SONY phone and when I run window.navigator.userAgent;
it returns the device name as F3311
(sadly platform.js doesn't recognize that). And that means another model from SONY would appear with another device code. There is also HUAWEI and XIAOMI and many other brands.
Is there a javascript library out there with which I can use a sample piece of code like this:
if(userDevice == SONY)
{
//do stuff that is supported by Sony phones only, etc
}
else if (userDevice == HUAWEI)
{
//show stuff that will appear only on Huawei phones, etc
}
These might be useful, http://gs.statcounter.com/vendor-market-share/mobile and https://www.idc.com/promo/smartphone-market-share/vendor
EDIT 1: I have found this https://deviceatlas.com/products/web but I don't know if they are offering just what I need. I will inquire.