Skip to main content

Posts

Showing posts with the label Java/Kotlin

Solving Smaato Ad Load Failures on Android 9+: The Network Security Config Fix

  Few things are more frustrating in Android development than an SDK integration that works perfectly on a test device running Android 8.0 but fails silently on a Pixel running Android 14. If you are integrating the Smaato SDK (or any programmatic ad network) and noticing that ad requests return "Success" but the ad container remains empty, you are likely hitting a security wall. On Android 9 (API level 28) and above, the operating system blocks  Cleartext HTTP traffic  by default. While the Smaato SDK communicates securely over HTTPS, the actual ad creatives—banners, videos, or tracking pixels—often originate from third-party Demand Side Platforms (DSPs) that still rely on unencrypted HTTP. When the WebView attempts to render these assets, the OS kills the connection. This guide details the root cause and the specific Network Security Configuration required to restore revenue flow. The Root Cause: Android's Default Security Policy Prior to Android 9 (Pie), apps could mak...