I try to do something different if the device is a large one (like a iPad or Galaxy Tab) V.S. a small one like a mobile phone.
I am thinking to decide if a device is a large one by following code
local largeDevice = false local model = system.getInfo("model") if (string.find(model, "Pad") ~= nil) then -- it's iPad family largeDevice = true else local androidWidth = system.getInfo("androidDisplayWidthInInches") if (androidWidth ~= nil and androidWidth \> 4) then -- device over 4 inches largeDevice = true end end
Any suggestion?
Thanks.