Flipkart Anirudh Ramanan Apr 1, 2020

Madman: An Open-Source Ads Framework for Android

Article Summary

Anirudh Ramanan from Flipkart reveals how Google's IMA library was causing 15% of users to bail before videos even started. Their solution? Build their own ads framework from scratch.

Flipkart's engineering team open-sourced Madman, a video ads framework for Android, after hitting performance walls with Google's IMA library. The move came as Flipkart entered video streaming and needed better control over ad playback and UI customization.

Key Takeaways

Critical Insight

Flipkart cut video join time by 1 second and reduced pre-video exits by replacing Google's IMA library with their own open-source ads framework built on native views.

The article reveals exactly which IMA architectural decision caused those black frames that killed their user experience.

About This Article

Problem

Flipkart's video platform ran into performance issues with Google's IMA library. The library used WebView rendering, which caused black frames when ads started up. This made it impossible to build custom features like Rich CTAs or reliable ad countdown timers.

Solution

Flipkart built Madman, an in-house ads framework that uses native views instead of WebView. This gave them full control over the UI and let them support VAST-compliant ad servers. The framework also has extensible components for custom network and XML parsing layers.

Impact

In production testing, Madman loaded pre-roll ads about 700ms faster than IMA. When they rolled it out gradually, they saw improvements in video streaming reliability and user retention across Flipkart.