Design and Implementation of a Global Floating Layer SDK for Unified B‑End Mobile Applications
The article details the background, value, architecture, lifecycle, performance, and real‑world business scenarios of a cross‑platform global floating‑layer SDK that enables zero‑code, real‑time, targeted pop‑up and overlay delivery across Android, iOS, Flutter and H5 apps, dramatically improving development, deployment and operational efficiency.
Background : Within the Beike ecosystem, more than 20 B‑end apps required disparate pop‑up and overlay solutions, each needing a full release cycle for updates, leading to high maintenance costs and limited flexibility.
Value : The Global Floating Layer SDK decouples operations from business code, allowing zero‑developer effort on the client side, real‑time configuration via a platform, and instant, targeted delivery of custom‑styled pop‑ups on any page, for any user group, without app releases.
Key Capabilities include platform‑wide configuration (audience, page, time range, priority, frequency), push or router‑based activation, H5‑driven UI via jsbridge, and plug‑and‑play integration requiring only a single SDK initialization.
System Architecture : The SDK monitors the app lifecycle, receives floating‑layer data via cold‑start, push, or router, applies frequency, priority and forced‑display rules, and dynamically injects H5 or native pop‑ups into the appropriate page.
kePopLayer Design : On app launch, the SDK establishes an IM push long‑link, caches received layer data per page, hooks page entry/exit events, and decides whether to display native or H5 pop‑ups based on priority and configuration.
Lifecycle & Closing Mechanisms : Layers can be closed when navigating away, via server‑push messages, H5 close API, or router calls. Page‑exemption settings prevent display on specific pages such as live streams or payment screens.
Caching Strategy : A map keyed by page name stores a queue of layer objects; the same layer appearing on multiple pages shares a unique ID so that closing one instance removes all.
Dynamic Priority Sorting : All layers follow a priority queue; native and H5 pop‑ups are shown one‑by‑one according to priority, with higher‑priority layers displayed first.
Performance : Fast response via pre‑downloaded H5 bundles, robust error handling (auto‑close on network failures), domain whitelisting, and extensible messaging (IM push, local router).
Business Scenarios : The SDK powered use cases such as random facial‑recognition prompts for risk control, rapid compliance notifications, credit‑score rule dissemination, nationwide broker compliance signing, quadrant‑based marketing, hidden‑number entry guidance, and merchant‑partner renewal reminders.
Impact : Adoption across multiple products (Link, A+, 21st Century, Fangjianghu, etc.) yielded significant efficiency gains—development time cut from >30 days to <3 days, operational rollout from days to hours, reduced costs, improved system stability, and enhanced user experience.
Beike Product & Technology
As Beike's official product and technology account, we are committed to building a platform for sharing Beike's product and technology insights, targeting internet/O2O developers and product professionals. We share high-quality original articles, tech salon events, and recruitment information weekly. Welcome to follow us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.