Does Corona give us any way to determine the full screen height and width, physically (in inches) so that I can have a larger UI appear if there is enough space physically for someone's finger?
Can we get the full screen height and width (in inches) for current device?
Mar 27 2019 09:26 PM
If you are using native, you can get a display's DPI on Android that way. Otherwise you should be able to get them via https://docs.coronalabs.com/api/library/system/getInfo.html#androiddisplayxdpi (I'm not sure as to why there is a different DPI command for width and height).
After you get the DPI, you can solve the physical size of the screen for Android devices.
For iOS devices, since there aren't that many of them, you could write a short nested statement that checks for what the device is and then picks its DPI from a list.
I have another solution: I have a slider in my settings that sets the interface size. That way people can customise according to device but also personal preference. Works really well, and it allows a 10-year old skinny boy or girl to have a smaller interface size than a 300-pound Samoan giant would prefer, even thought they both use the same device.
iOS does not allow you to get physical screen size through any API.
What you can get, however, is the model specification of the iOS device running your app. Using this you can then derive the physical screen size, because you know which device it is, and can look up the information for this device. But this is a sort of 'dumb' approach, not automated.
Another drawback to this is that you only have the info for past and current iOS devices. If a new model comes out you won't know what the screen size will be, unless you update the app to incorporate this new information.