# Bringing Grab’s Live Activity to Android: Enhancing user experience through custom notifications

[Grab](https://yomu.fyi/company/grab) · Jessica Sean · Sep 23, 2024

**Type:** Problem & solution

## Summary

Grab designed an equivalent to iOS Live Activities for Android to provide real-time order tracking outside the app. Because Android lacks Apple's native ActivityKit push token system, the team substituted push tokens with placeholder values to maintain technical consistency across platforms and preserve backend push targeting via their Hedwig service. For the user interface, engineering selected custom notifications over floating views because custom notifications avoid intrusive screen usage and do not require the 'Draw over other apps' permission. The client implementation separates responsibilities across dedicated classes: LiveActivityIntegrationManager handles token registration across business verticals, LiveActivityAttributes encapsulates UI configuration, and LiveActivityManager maps payloads to Android NotificationManager instances. The solution launched for Food, Mart, Express, and Transport verticals.

## Context

Grab wanted to replicate iOS Live Activity real-time order tracking on Android, but Android lacked both an official equivalent framework and a push token mechanism like ActivityKit.

## Approach / What changed

Engineering substituted iOS Push Tokens with placeholder identifiers to preserve backend messaging consistency, implemented custom notification remote views instead of floating views to avoid intrusive permissions, and abstracted lifecycle and payload rendering into modular integration and attribute managers.

## Takeaways

- Custom Android notifications were chosen over floating views to avoid demanding the 'Draw over other apps' permission while providing non-intrusive updates in the notification drawer.
- Substituting iOS Push Tokens with placeholder values allowed Grab to reuse its existing iOS backend delivery flow and ensure notifications only targeted supported Android devices.
- Custom notification remote views impose strict size constraints on Android, limiting content to 48dp when collapsed and 252dp when expanded.

**Tags:** [Android](https://yomu.fyi/topic/android), [Architecture](https://yomu.fyi/topic/architecture), [iOS](https://yomu.fyi/topic/ios)

[Read original post](https://engineering.grab.com/live-activity-2)
