There is a bug in the App Inventor framework that causes a screen orientation flip issue. The “orientation” option for screen orientation does not behave as expected, resulting in unintended behavior. This extension solves the problem by using reflection to access the ScreenOrientation.class, which is part of the App Inventor framework. It modifies its internal state to replace the “unspecified” screen orientation value with “User” for all screens, thus correcting the issue.
This extension is similar to one made by Sumit and does not have any blocks. To use it, simply drag it to Screen1 and it will work automatically.
The extension has some working conditions, however. When auto-rotation is off, it will work for the following conditions:
If you have a single screen
If you have only 2 screens in portrait and landscape mode
If you have multiple screens in portrait orientation.
When auto-rotation is on, the flip will only occur upon the first launch of the app, but switching screens should work fine afterward.
Please note that this is my first extension, and I am still in the learning phase. Feel free to experiment with the code and make any necessary changes. Thank you for your understanding.
I have noticed it lately. It was working on my tests. idk.
Remember, this is just a temporary solution because of the limitations on extensions. Devs should fix it internally in order to completely fix the issue.
To ignore auto rotation for Portrait apps. Add this to the menifest for every screen.
android:screenOrientation=“portrait”
I tried making the extension add it, it adds but as a duplicate. Seems like we can’t replace the original screen values. If you still want the extension to add and just delete the original screen manifest data than i can provide you the extension.