Hello)
I made an app(years have passed since i made it last time). Gideros has a great evolution, i'm so happy with that.
But i can't understand how to rotate screen on android. It works perfectly on html5 without any string of code it rotates so well. But on android it doesn't rotate at all. Even if i use android:screenOrientation="sensor" - screen rotates but app still have fixed rotation
Comments
Does it work if you set your app in landscape in project properties?
Also, take a look here:
https://forum.gideros.rocks/discussion/7269/code-for-landscape-or-portrait
https://wiki.gideros.rocks/index.php/Application:getDeviceOrientation
and you could also listen to
Likes: MoKaLux
But i was impressed how it works in browser and wonder about possibility to make it works on mobile same way
But it's not working:( Or i'm doing something wrong. returns snippet by sinistersoft works even stranger
I wonder if that happens since https://forum.gideros.rocks/discussion/8757/gideros-2024-6-released
This always reads "portrait" for me even changing player > hardware
Likes: MoKaLux
Internally Gideros deals with three orientations which are:
- hardware orientation: supposed to be the fixed native/hardware orientation of the display
- device orientation: the current orientation of the device, that is whether you currently hold your phone (if allowed to riotate) in portrait or landscape mode or upside down
- orientation: your app orientation
Since 2024.6 I tried to stick to the definitions above for every platform (android would soemtimes change hardware orientation along device orientation, or sometimes even app orientation, but perhaps I missed some changes.
In the player menu, hardware orientation actually changes the fixed hardware orientation, not the device orientation. Thinking about it, it looks wrong...
Likes: pie
However to answer @unlying I just tried this on android player on my device with gideros 2025.1.1 and getDeviceOrientation works as expected.
What I am not sure is why I have to call application setOrientation to rotate the screen, but I might have built my player with "normal orientation" instead of "all orientations" enabled in project properties.
Likes: MoKaLux