How to determine if a device is a high-end or low-end one?

I am thinking to determine if a device is high-end (such as iPhone 5/5S) or middle-end (such as iPhone 4S, Galaxy 4) or low-end (iPhone 3GS, Galaxy 3)…

Is there an easy way to do this for all kinds of devices?

Or I have to use something like system.getInfo(“architectureInfo”) to determine one device a time?

The tier listing is pretty subjective, so I don’t think there is a native way to accomplish this. Coincidentally, mutatron just put up and interesting post on modifying a Corona-built apk to reflect some additional information. You might be able to use that as a jumping off point to create a tier-gate for your app:

http://forums.coronalabs.com/topic/42390-how-to-modify-your-apk-using-apktool-jarsigner-and-zipaligner/

Here’s an idea. You could implement some math based CPU benchmark process. Similar to what dedicated apps in this space do ie : 

http://www.iphonebenchmark.net/cpu_test_info.html

but something shorter and simpler. 

@ksan Thanks for the tip. It solves part of my problem now.

There is one thing I surprisingly found out. My Galaxy Tab 3 has better CPU response than iPhone 4S/5, even 5S. However, when it comes to UI rendering (with I/O), Galaxy Tab still looks laggy and cannot compare with iPhone 4S/5/5S at all.

So I can’t use this CPU test for Android devices. Apple is really good at integrating the hardware & software. From developing apps for both iOS & Android, now I see more clearly what’s going on. 

Very interesting. Would love to see more info on your findings. Thanks in advance.

I searched the web to see if there are some math functions to test the CPU, and I use something like this

http://benchmarksgame.alioth.debian.org/u32/program.php?test=binarytrees&lang=lua&id=2

I turn off all the prints, and use code like this to print out the time difference before & after performing the math operations,

local cpu\_testing\_start = os.clock() timer.performWithDelay(0, function() testcpu() local diff = os.clock() - cpu\_testing\_start print("the diff=", diff) end)

And the diff for different devices I have:

  • iPhone 4S:  0.144026 ~ 0.181460

  • iPhone 5:    0.074126 ~ 0.088407

  • iPhone 5S:  0.041076 ~ 0.043670

  • iPad 4:        0.083305 ~ 0.089408

** Galaxy Tab 3 8.0 -  0.025328  ~ 0.045657

See, Galaxy Tab even has better result than 5S. Do you think my cpu testing has some flaw?

My app downloads 17 pictures from the Internet and save the images to a temporary folder and in between I use display.newImage() to show them with some UI effects (such as scaling & some icon movements)

From UI perspective, iPhone 5 & 5s is so smooth but Galaxy Tab is so laggy.

I use the cpu test result to decide what kind of restriction to put on. For example, how many concurrent UI effects can be executed at a time & the interval to perform each UI effect. 

The tier listing is pretty subjective, so I don’t think there is a native way to accomplish this. Coincidentally, mutatron just put up and interesting post on modifying a Corona-built apk to reflect some additional information. You might be able to use that as a jumping off point to create a tier-gate for your app:

http://forums.coronalabs.com/topic/42390-how-to-modify-your-apk-using-apktool-jarsigner-and-zipaligner/

Here’s an idea. You could implement some math based CPU benchmark process. Similar to what dedicated apps in this space do ie : 

http://www.iphonebenchmark.net/cpu_test_info.html

but something shorter and simpler. 

@ksan Thanks for the tip. It solves part of my problem now.

There is one thing I surprisingly found out. My Galaxy Tab 3 has better CPU response than iPhone 4S/5, even 5S. However, when it comes to UI rendering (with I/O), Galaxy Tab still looks laggy and cannot compare with iPhone 4S/5/5S at all.

So I can’t use this CPU test for Android devices. Apple is really good at integrating the hardware & software. From developing apps for both iOS & Android, now I see more clearly what’s going on. 

Very interesting. Would love to see more info on your findings. Thanks in advance.

I searched the web to see if there are some math functions to test the CPU, and I use something like this

http://benchmarksgame.alioth.debian.org/u32/program.php?test=binarytrees&lang=lua&id=2

I turn off all the prints, and use code like this to print out the time difference before & after performing the math operations,

local cpu\_testing\_start = os.clock() timer.performWithDelay(0, function() testcpu() local diff = os.clock() - cpu\_testing\_start print("the diff=", diff) end)

And the diff for different devices I have:

  • iPhone 4S:  0.144026 ~ 0.181460

  • iPhone 5:    0.074126 ~ 0.088407

  • iPhone 5S:  0.041076 ~ 0.043670

  • iPad 4:        0.083305 ~ 0.089408

** Galaxy Tab 3 8.0 -  0.025328  ~ 0.045657

See, Galaxy Tab even has better result than 5S. Do you think my cpu testing has some flaw?

My app downloads 17 pictures from the Internet and save the images to a temporary folder and in between I use display.newImage() to show them with some UI effects (such as scaling & some icon movements)

From UI perspective, iPhone 5 & 5s is so smooth but Galaxy Tab is so laggy.

I use the cpu test result to decide what kind of restriction to put on. For example, how many concurrent UI effects can be executed at a time & the interval to perform each UI effect.