The Android SDK used by Android 8.1.0 introduced some new changes which cause crashing for certain ad networks. Here's the reason why, and what we are doing to solve the issue for you.

What changed?

In Android Oreo, a change was made to prevent non-fullscreen activities from requesting orientation changes.

Many ad network SDKs use this feature, for example to show a landscape video ad in a portrait application, but these SDKs were not set up to handle the situation that arises when the orientation request is denied. This causes an unexpected exception which crashes the app.

What changed, from a technical standpoint?

In this Android platform commit, a new change was introduced which prevents non-fullscreen activities from requesting changes to the screen orientation.

The implementation results in an IllegalStateException being thrown when the setRequestedOrientation method is called. As this exception is new, many ad network SDKs are not explicitly catching and handling it, therefore they leave it unhandled, which results in a crash.

How does the Enhance fix work?

The only real fix for this issue currently is to set the target SDK version to 25 or lower. This is a change that Enhance can make to your app, but we currently put up a notice when we are going to change your targetSdkVersion because it can cause issues if you are using some very new Android SDK features.

In the vast majority of cases our fix will work well, but if you require some features that are only available beyond SDK level 25 then unfortunately there is no good solution available. This is very unlikely, however, because the majority of Android users are on SDK version 25 or lower.

Did this answer your question?