If the targetSdkVersion
is greater than the device OS version, and if I lower the targetSdkVersion
to the device OS version, is the app going to behave differently ?
My application targetSdkVersion
is 27 and I am running on a 8.0.0[26]
device. I get an IllegalStateException
as described in the below link, since I am using a dialog Activity
.
java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation
There were two options suggested. Removing android:screenOrientation="portrait"
from AndroidManifest.xml
or changing the targetSdkVersion
to 26. Both the solutions are working for me.
But my question is regarding changing the targetSdkVersion
to 26. How is the app behavior going to change when we lower the targetSdkVersion
from 27 to 26 and the device OS is 26? Since the device is running in 26 and the targetSdkVersion
is 27, I don't think any compatibility modes are applied. My understanding is, the compatibility mode is applied, when the device OS version is greater than the targetSdkVersion
.
So how is the app behaviour changing when we change the targetSdkVersion
here?