Problem
Native in-apps are limited to portrait mode when usingonConfigurationChanged(), which prevents landscape orientation, whereas HTML in-apps support both orientations.
Instructions
- Open the Handling Configuration link, change, and override the code in your activity or fragment.
Kotlin
InformationThis method notifies the MoEngage SDK when a configuration change occurs for an activity or fragment that Android does not handle.
- To manually manage configuration changes for an activity or fragment, you must add the
android:configChanges="orientation"attribute to the relevant<activity>tag within yourAndroidManifest.xmlfile.
AndroidManifest.xml
- Run the Native app with this setup, call
showInApp()inonResume, and the in-app will appear in its default portrait mode.

- When orientation changes, the in-app disappears and displays
ORIENTATION_NOT_SUPPORTEDfor the native in-app campaign.


- HTML in-apps support both portrait and landscape orientations. Internally,
onConfigurationChanged()calls ConfigurationChangedHandler’sshowInAppOnConfigurationChange()of the HTML in-app.


