Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to detect Samsung devices with system.getInfo() ?
Started by orangecyan Dec 03 2015 12:21 AM

3 replies to this topic
system.getinfo() model detection samsung
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

orangecyan

[GLOBAL: userInfoPane.html]
orangecyan
  • Observer

  • 24 posts
  • Corona SDK

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!



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

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



[TOPIC: post.html]
#3

orangecyan

[GLOBAL: userInfoPane.html]
orangecyan
  • Observer

  • 24 posts
  • Corona SDK

Hi Brent,

 

thanks for your quick reply. You may inquire ;-)

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



[TOPIC: post.html]
#4

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

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. :)

 

Brent




[topic_controls]
[/topic_controls]