On Android there are ways to determine the actual device size. Look at the system.getInfo() API library call. For iOS those don’t exist, but because the device set is limited and the screen sizes well known, you can look up the device and go from there. In general, with Corona SDK you do not need to know that. We create a virtual canvas based on the values you provide in your config.lua.
display.contentWidth and display.contentHeight will reflect the values in your config.lua
display.actualContentWidth and display.actualContentHeight will reflect the size of the screen when you’re using letterbox mode and the screen is a different shape than the values you provided in the config.lua. For instance, lets say you did this:
width = 640
height = 960
in your config.lua, which is the size of an iPhone 4 screen. On an iPhone 5, you would get:
display.contentWidth = 640
display.contentHeight = 960
display.actualContentWidth = 640
display.actualContentHeight = 1136
But if you did a width of 320 and height of 480, then you would get:
display.contentWidth = 320
display.contentHeight = 480
display.actualContentWidth = 320
display.actualContentHeight = 568
If you did a width of 800 and a height of 1200 then you would get:
display.contentWidth = 800
display.contentHeight = 1200
display.actualContentWidth = 800
display.actualContentHeight = 1420
It’s all scaled based on your requested content area. If you use a set width and height in your config.lua, then there is no guarentee that 0, 0 will be the top left corner and that display.contentWidth, display.contentHeight will be the bottom right corner. However in that circumstance display.actualContentWidth, display.actualContentHeight will be the bottom left corner. There are two other important values:
display.screenOriginX
display.screenOriginY
which is the actual x and y of the top left corner.