One HarmonyOS Skill Automates PiP, Flash Control Window & Ball Integration
HarmonyOS introduces the hmos-arkui-kit-window-floatwindow Skill that automates integration of three system-level floating window types — Picture-in-Picture, Flash Control Window, and Flash Control Ball — plus window-ball binding and anti-peep protection, reducing manual coding through AI-assisted two-step setup in DevEco Code.
HarmonyOS floating-window capabilities — Picture-in-Picture (PiP), Flash Control Window (floatView), and Flash Control Ball (floatingBall) — let users multitask without interrupting video playback, stock monitoring, navigation, or one-tap actions such as order grabbing. The hmos-arkui-kit-window-floatwindow Skill packages all three forms and their combinations into a single automated integration flow.
Three Floating Window Forms Covered
Picture-in-Picture: Video pops out as a top-level floating window; playback continues when the user switches to WeChat, Xiaohongshu, or other apps. Window region, button count, and interaction are system-defined with templates for video, call, meeting, and live scenarios.
Flash Control Ball: System-rendered edge ball; developers only configure display text. Single-tap and double-tap trigger preset business actions.
Flash Control Window: Lightweight persistent page that stays visible after the app moves to background. Suited for stock tickers, navigation, fitness tracking. Two shape options: rounded card or narrow horizontal bar.
Two Combination Features
Window-Ball Binding: Window can collapse into the ball; tapping the ball restores the window. State transitions are handled by the system — no manual state synchronization required.
Anti-Peep Protection (dlpAntiPeep): When a bystander is detected near the screen, the system automatically overlays a mask on the floating window to protect sensitive content.
Two-Step Integration via DevEco Code
Download & Install: Obtain the Skill file from the Matrix OpenHarmony Platform Skill Square (
https://matrix.openharmony.cn/#/skillSquare/details?id=6ae44bf02f935261e2a3f7ee) and place it in the DevEco Code Skill configuration directory.
Trigger the Skill: In the AI chat, include keywords such as "PiP", "floatView", "floatingBall", "闪控窗", "闪控球", "球窗绑定" or phrase a request directly, e.g.:
"[Dev] Help me add Flash Control Ball to my existing project"
"[Query] What parameters does the Flash Control Window creation API need?"
"[Debug] Why did Flash Control Ball and Flash Control Window binding fail?"
The AI routes the intent to one of four modes: Q&A (feature/constraint confirmation), Debug (code bug diagnosis with fix suggestions), Assisted Programming (rapid integration of PiP, floatView, floatingBall), or Prototype Verification (runnable demo via glue code).
Business Value
Finance apps pin real-time quotes with Flash Control Window; ride-hailing, food-delivery, and study apps use Flash Control Ball for one-tap order grabbing or question search; video, live-streaming, and meeting apps adopt PiP for uninterrupted playback during chat or app switching. The common goal: smoother multitasking.
For deeper practice, HarmonyOS Developer Alliance's Developer Academy offers courses on multi-window, PiP, floating windows, split-screen, and a "Stock Multi-Window Collaboration & Floating Monitor" case study (
https://developer.huawei.com/consumer/cn/training/course/live/C601769074939594522). All HarmonyOS SDK Skills are listed on the Matrix platform under the "HarmonyOS Open Capability" tag ( https://matrix.openharmony.cn/#/skillSquare?tag=SDK).
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
