How to detect Samsung devices with system.getInfo() ?

Hello,

is there a solution to detect Samsung devices using system.getInfo() ?

I tried to look for “Galaxy”, “GT” or “SM” in model or architectureInfo, but couldn’t make a proper solution.

Thanks for help!

Hi @orangecyan,

Well, you could try using “name” as the argument for system.getInfo(), but I doubt it would be reliable since Samsung makes a gazzillion different devices and there may be zero consistency in what it considers their “names”.

Can I inquire why you desire this? What do you want to do which needs Samsung-specific detection?

Brent

Hi Brent,

thanks for your quick reply. You may inquire :wink:

I am using custom fonts in my app, and while testing on different devices, I found that Samsung devices do not render text very well.

iOS devices do it sharp, HTC as well, but Samsung do not. (I haven’t had the opportunity to test with the latest S6, but with 3 other models.) My idea in this case is to look up Samsung devices and then change the text font to Noto.

Samsung devices do not respond consistently in system.getInfo(), like “Galaxy” or similar. So my hope is that there might be somewhere a list of Samsung devices with the system data they respond, but I could not find any yet. 

Hm, just checked my Android Developer Account and looked for all Samsung devices that are supported for one of my apps, as an example: 1016 different Samsung devices… a lot. Next to the model name there is some kind of short name, example:

SamsungGalaxy Tab4 7.0 – degaswifidtv

Would this be the string I could look for with “archirectureInfo” oder “model”?

Simon

OK, since it’s not crucial (just desireable) for you to use a different font on Samsung devices, you could try doing a string search (find) in the “model” string for terms like “Galaxy”, “Samsung”, etc. It probably wouldn’t be 100% reliable, but it’s better than nothing. :slight_smile:

Brent

Hi @orangecyan,

Well, you could try using “name” as the argument for system.getInfo(), but I doubt it would be reliable since Samsung makes a gazzillion different devices and there may be zero consistency in what it considers their “names”.

Can I inquire why you desire this? What do you want to do which needs Samsung-specific detection?

Brent

Hi Brent,

thanks for your quick reply. You may inquire :wink:

I am using custom fonts in my app, and while testing on different devices, I found that Samsung devices do not render text very well.

iOS devices do it sharp, HTC as well, but Samsung do not. (I haven’t had the opportunity to test with the latest S6, but with 3 other models.) My idea in this case is to look up Samsung devices and then change the text font to Noto.

Samsung devices do not respond consistently in system.getInfo(), like “Galaxy” or similar. So my hope is that there might be somewhere a list of Samsung devices with the system data they respond, but I could not find any yet. 

Hm, just checked my Android Developer Account and looked for all Samsung devices that are supported for one of my apps, as an example: 1016 different Samsung devices… a lot. Next to the model name there is some kind of short name, example:

SamsungGalaxy Tab4 7.0 – degaswifidtv

Would this be the string I could look for with “archirectureInfo” oder “model”?

Simon

OK, since it’s not crucial (just desireable) for you to use a different font on Samsung devices, you could try doing a string search (find) in the “model” string for terms like “Galaxy”, “Samsung”, etc. It probably wouldn’t be 100% reliable, but it’s better than nothing. :slight_smile:

Brent