Android Question B4XPages and SDK36

BanditMrP

Member
Licensed User
Hi,

I have a couple of corporate apps that use B4XPages, and I just noticed that when I target SDK36 (B4A 14.0 at the moment), the orientation lock is lost.

Targeting SDK35 restores the orientation lock.

Is there something I'm missing somewhere that I need to add when targeting SDK36 to keep the orientation lock?

Any help much appreciated.
 
check if this applies to you
 
Upvote 0
Thanks for the info.

Unfortunately, my app does not have that turned on in Settings->Advanced->Labs->Landscape view for portrait apps.

It is a Landscape only app - except when targeting SDK36 that doesn't seem to be enforced any more.
 
Upvote 0
I’ve checked and it happens on multiple apps, tablet and phone. A phone app that is locked to portrait and a tablet app that is locked to landscape. When targeting sdk36 the lock doesn’t work.
 
Upvote 0
Thanks for the info.

Unfortunately, my app does not have that turned on in Settings->Advanced->Labs->Landscape view for portrait apps.

It is a Landscape only app - except when targeting SDK36 that doesn't seem to be enforced any more.
On tablets running Android 16 or later, you can no longer restrict orientation; the system ignores all restrictions.
 
Upvote 0
Make a test with this in the manifest editor:
Code: Copy
AddApplicationText(
 <property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />
)
I’ll give that a try later today - I’m with a different client at the moment. Thanks for the quick response.
 
Upvote 0
You can with this flag.
It's too bad I didn't find out about this until today, because I've already started implementing my apps for tablets running Android 16 or higher in both orientations (portrait and landscape).
But I don't think it can do any harm. :)
 
Upvote 0
Back
Top