I'm trying to write a monkeyrunner script that will automate the installation of mdm software for enterprise users. The script will be executed with multiple devices and thus multiple screen sizes and densities.
Is there a way to take a reference coordinate from device A and scale it so that it can be applied to other devices? I started off taking the initial touch coordinates from a reference device, in this case a Samsung Galaxy S2 with a 480 x 800 display with a screen density of 1.5, and calculating a scaled coordinate based on the device at runtime. However, the RAZR Maxx HD with a screen display of 720 x 1184 (some height removed for the soft keys) and a screen density of 2 doesn't work with this method.
Does anyone have more insight to the packing algorithm so that the coordinates from one device can be used for any device?
I did look at using AndroidViewClient to access the buttons of the view directly, but since the script is intended for enterprise end users, it couldn't be used due to the devices being secure.