PhonePe Pincode Android Team Jul 17, 2024

Building the Pincode Android App with Jetpack Compose

Article Summary

The Pincode Android Team at PhonePe built an entire app with Jetpack Compose while it was still maturing. 2.5 million downloads later, they're sharing what actually worked and what didn't.

PhonePe's Pincode team adopted Jetpack Compose for their Android app in production, making them early adopters of Google's declarative UI toolkit. This detailed retrospective covers their journey from 2020 exploration through shipping a real product, including the mistakes they made and lessons learned along the way.

Key Takeaways

Critical Insight

Jetpack Compose delivered faster development and easier animations, but required deep understanding of recomposition, side effects, and the Stable/Immutable annotations to avoid performance pitfalls.

The team reveals specific patterns that caused frame drops and why they're now exploring Compose Multiplatform for their next evolution.

About This Article

Problem

PhonePe's Pincode team had trouble integrating MapMyIndia, a third-party SDK that didn't work well with Compose and needed a lot of boilerplate code to set up.

Solution

They took a practical approach by using Compose's ability to work alongside traditional Android UI components. When needed, they could fall back to older methods and use AndroidView wrappers to handle complex external libraries.

Impact

This approach let the Pincode app launch with a full Compose UI while still supporting the third-party services it needed. The app reached 2.5 million Play Store downloads without waiting for the SDKs to modernize.