Building Android Conversation Bubbles

This post details the technical implementation of Android Conversation Bubbles for DMs and Group DMs. It covers the prerequisites: using MessagingStyle, implementing Sharing Shortcuts with custom avatar generation and asynchronous updates, and employing a trampoline Activity to route shortcut intents to the correct UI (Compose, Messages, or Bubbles). A hacky but effective method for detecting Bubble launches on Android 11 using display name prefixes is described. The post also addresses challenges in ensuring the Bubble displays the correct content by disabling navigation and opening specific flows in the main app, and a bug fix for dismissing notifications when a Bubble is active. Finally, it explains how the Slack websocket infrastructure was adapted to support team switching within Bubbles.