As the title says : I set the targetSdk to 36 and screenRotation="portrait" in manifest and its not ignored by the system even they say so in the warning:
So I am still able to lock the orientation. Here is a repro repo:
https://github.com/sevbanBayir/orientationRepro
My question is that must this be a real concern for a regular app developer that aims only develop portait mode apps ? Or will i be forced in the future like you can not upload this because you are targeting sdk 36 and set a locked orientation ?
The android documentation does explain it here:
Android 16 (API level 36) overrides app restrictions for screen orientation, aspect ratio, and resizability to devices with smallest width >= 600dp, which are:
Exception for the overrides are:
You can opt out of this behaviour by setting this property in the <application>
element:
<application ...>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY"
android:value="true" />
...
</application>
However, starting with API level 37 next year, the opt-out capability will be completely ignored for displays that are at least sw600dp.
Therefore, it's recommended to make your layout adaptive. If you prefer not to do so, you can restrict your app distribution to smaller devices (mobiles) by using the <supports-screens> tag or by excluding specific devices via the Google Play Console.