We haven't figured out a way to do this automatically. Currently we prompt the user to enter the size of the device when the app is opened for the first time.
One solution would be create a companion app that determines the physical screen size, then makes that available to your network via web sockets.
There our a few steps I left out here but it's possible.
The app could be optional - if its installed that device will have fully automatic configuration. If it's not installed, you just fall back to your user prompt.