Snapchat Nov 28, 2021

Shipping Two Apps In One Android

Article Summary

Snapchat shipped two complete Android apps in a single APK to A/B test their rewrite. The engineering challenge? Android wasn't designed to support this at all.

When Snapchat rebuilt their Android app from scratch, they faced a critical question: how do you test a complete rewrite without losing the ability to update your production app? Their solution was technically audacious: bundle both the old and new apps together, let users switch between them, and A/B test at scale. They built a library called Stuffing to make it work.

Key Takeaways

Critical Insight

Snapchat open-sourced Stuffing, proving you can ship two apps in one APK for proper A/B testing, though the edge cases around data migration, entry points, and app switching add significant complexity.

The article reveals how they hid an alpha opt-in easter egg that the Android community discovered in days, plus the tricky backwards compatibility cases that forced them to keep Stuffing even after removing the old app.

Recent from Snapchat

Related Articles