Device width & height on mobiles

Started by muruba, June 27, 2017, 08:36:15

Previous topic - Next topic

muruba

I just noticed that for my android device width and height for landscape mode are actually reported as in portrait mode, is it true for any other devices (ios/android)?

So I have my game in landscape, but:

06-27 17:33:32.534 22977 23043 I [Monkey]: DeviceHeight: 1920
06-27 17:33:32.534 22977 23043 I [Monkey]: DeviceWidth: 1080

MikeHart

I have to check this myself tonight. Which Monkey version do you use? " or X, if X, which version. What Android version and what device?

When do you retrieve these values? In OnCreate?

muruba

Thanks!

onCreate
Monkey 86e
galaxy s6 (Android version 7.0)

MikeHart

When start the app , do you turn it to landscape?


Please try to retrieve the dimensions in OnUpdate to see if it makes any difference.

muruba

This is crazy but I can't replicate it any more.

Now it is showing:

06-27 19:29:40.909  3546  3581 I [Monkey]: DeviceHeight: 1080
06-27 19:29:40.909  3546  3581 I [Monkey]: DeviceWidth: 1920

every time I try rotating the device in all possible ways.

I also have:

android:screenOrientation="landscape"

Thanks!

MikeHart

Back in the days I experienced this odd behaviour that the app on the device was not updated right away as I made changes. Maybe it was still running in the backround, i don't know.

Glad it is working for you now.