Android Question B4x Orientation - landscape App restarts

Hi Folks.
I have discovered a strange behavior when an app is set to landscaped orientation and the power button of the cell phone is pressed...
I narrowed it down so a single page and attached it as zip file for download.

Here is what happens:
I start the app, move the app into the background and then press the power button of the device.
I press the power button again, select the running app and make it active - everything works as expected - the app continues where it was paused.

However, when I start the app and press the power button while the app is running in the foreground, press the power button again to continue with the app, it restarts...

This only happens when the orientation is set to landscape mode. When I recompile the same app set to portrait mode, everything works as expected again.
Has anybody experienced a similar behavior with his app in landscape mode?

Device: Pixel 8 Pro with Android 15
using B4x 13
B4X Pages
 

Attachments

  • Test_AppB4X.zip
    9.4 KB · Views: 9
Solution
Doesn't happen here, however try to add this to the manifest editor:
B4X:
SetActivityAttribute(Main, "android:configChanges", "orientation|screenSize")
Thanks Erel for the quick reply.
Indeed, adding this line to the manifest editor helped and the strange behavior is gone.
Although I really don't know what this line does technically, it solved the issue.
Thanks so much.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…