Search code examples
androidnativefullscreenscreen-orientation

Screen rotation possible on Progressive Web App but not on Native android app


I am building an app with Goodbarber, an app builder that allows users with no IT development skills like me to build native apps. I am contacting you because I have a problem with my native Android application:

Screen rotation is not possible as soon as I'm on the native app. This is a problem for me because I would like to allow my users to put the youtube videos present in the application in full screen. I think the fact that the rotation is not possible, it blocks the full screen of youtube videos (the full screen icon is not clickable)

When I test the app in Progressive Web App, no problem. I can put its videos in full screen (the full screen icon is clickable and the full screen is displayed in 16-9).

I have already tested several codes such as for example:

  • put a in the to change the orientation of the screen (without success)

  • put '' allowfullscreen '' in the (without success, even with allowfullscreen = "allowfullscreen")

Would you have a solution for me as I can't find any code that helps me?

Thanks for your help.


Solution

  • There are some parameters to test, I think you don't need "allowfullscreen" or stuff like that, rather orientation definitions:

    Go into your AndroidManifest.xml and change android:screenOrientation="landscape" to android:screenOrientation="sensorLandscape" or that one you want from the parameter list.

    For further fullscreen option take a look at this documentation.

    Good luck buddy! :)