Forums

OverviewFelgo 2 Support (Qt 5) › VPlay Live – ability to lock orientation

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18460

    Marcin

    Hi Felgo,
    I love using you live server but there is something that, potentially, could be improved.
    Currently, if my app is in portrait mode, live server still allows to rotate the screen to landscape when you rotate the phone.
    Funny that even if I block rotating on the phone, live server still allows to rotate the app.
    Is it possible to kind of “lock” app orientation when testing on smartphone?

    #18470

    Alex
    Felgo Team

    Hi Marcin,

    currently the screen orientation of an Android app is set in the AndroidManifest.xml, and read at startup. Since the Live Client app uses its own AndroidManifest.xml at startup (as it is an Android app on its own), effectively the xml of your projectis ignored, as we do not load your project at startup but at runtime. I hope that is comprehensible so far. So since we do not know the users preferred screen orientation at startup, we allow all orientations by default.

    A possible improvement would be to detect the preferred screen orientation when loading the user project. But I guess this is more a nice to have.

    There is the possibility to change the orientation at runtime using a small JNI call, described here: https://forum.qt.io/topic/70609/force-screen-orientation-on-android/4

    The fact that Qt applications ignore the native allow rotation setting seems to be a Qt bug.

    Cheers,
    Alex

    #18471

    Marcin

    Hi Alex,
    Thank you for explanation.
    I thought it will be something like you described, so I am not surprised.
    It’s not an issue for me, or anything, so not a big deal.

    Probably will skip the JNI method, not worth it 🙂

    #18476

    Christian
    Felgo Team

    Hi Marcin,

    due to popular demand for this feature, we’ll add support for orientation lock at runtime to one of the next Felgo updates.

    Cheers, Chris

    #18477

    Marcin

    Hi Christian,

    Great to hear.

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support