Swiggy Manjunath Chandrashekar Sep 19, 2023

Making Swiggy's Order Tracking a Magical Experience

Article Summary

Swiggy discovered customers were anxiously checking their order tracking screen multiple times during the 20-45 minute delivery window. Their solution? Let users track orders while doing literally anything else on their phone.

The Swiggy engineering team implemented Picture-in-Picture (PIP) mode for their Android app's order tracking feature. This case study walks through the technical implementation, challenges with Android's multi-window mode, and early adoption metrics.

Key Takeaways

Critical Insight

Swiggy reduced order anxiety by enabling floating order tracking that persists across apps, achieving 30K+ weekly PIP views despite being limited to Android O+ devices.

The article includes actual Kotlin code snippets and reveals a clever workaround they used to handle Android's multiple task instances problem.

About This Article

Problem

When users entered Picture-in-Picture mode in Swiggy, multiple app instances would show up in recent tasks. This made the experience feel disjointed and confusing.

Solution

The team fixed this by finishing other activity tasks before entering PIP mode. They also used PipUtils utilities to keep recent tasks from appearing during state transitions.

Impact

Now users can multitask smoothly. The floating order tracker stays visible across different apps without messing up the app's task stack or navigation.