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.
 
Solution
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" />
)
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
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" />
)
After testing - I can confirm this was an issue only on B4XPages applications, only on Tablets, and adding the code above solves the issue.

Many many thanks @Erel for the quick and accurate solution.
 
Upvote 0
Back
Top