yzturbo-web-android
YZTurboWebAndroid 高性能 Android WebView 容器 SDK 接入。用于在 Android 项目中集成 WebView 容器,实现: (1) WebView 预加载与复用,提升 H5 页面加载速度 (2) 离线包管理,拦截请求优先命中本地资源 (3) JS Bridge 双向通信,Native 与 H5 互调 适用场景:Android App 接入 H5 页面、需要离线包能力、需要 JS 通信的业务
Why use this skill?
Integrate the YZTurboWebAndroid SDK to boost H5 performance with WebView reuse, offline package support, and native JS Bridge communication for Android apps.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/hefuwei-95/yzturbo-web-androidWhat This Skill Does
The yzturbo-web-android skill is a high-performance Android WebView container SDK designed to streamline the integration of H5 pages within native Android applications. It solves the typical pain points of WebView development by providing a sophisticated architecture for resource management and cross-platform communication. Its core capabilities include intelligent WebView pool management for preloading and reuse, effectively reducing the blank-screen duration for end-users. Furthermore, it incorporates a robust offline package management system that intercepts web requests to serve local assets, significantly optimizing page load speeds and network reliability. Finally, the skill provides a bidirectional JS Bridge, allowing seamless communication between Native Android code and JavaScript in the H5 environment, complete with a clean handler registration pattern.
Installation
To integrate this skill into your Android project, you must first ensure you have the OpenClaw agent installed. Run the following command in your terminal within your project workspace: clawhub install openclaw/skills/skills/hefuwei-95/yzturbo-web-android. Once the installation is confirmed, add the dependency to your build.gradle file: implementation 'com.youzan.turboweb:turbo-web:1.0.1'. Initialize the SDK in your Application's onCreate method using the WebViewLoader singleton to define your appKey and poolSize for optimal configuration.
Use Cases
- E-commerce Apps: Perfect for loading product detail pages or web-based checkout flows where instant interaction is critical.
- Enterprise Dashboards: Useful for hybrid apps that need to present modular, frequently updated web-based business intelligence tools.
- Offline-First Applications: Ideal for scenarios where users may have intermittent internet connectivity and require cached web resources.
- Dynamic Feature Modules: Allows teams to push web-based feature updates without requiring an app store binary release, bridged with native hardware or system APIs.
Example Prompts
- "Help me configure the WebViewLoader in my Application class for a retail app with a pool size of 3 and a default preload URL."
- "Show me how to implement a custom JS Bridge handler to fetch device sensor data from my native Android code and pass it back to the H5 page."
- "I need to use WebViewFragment in my current activity to load a URL while enabling the progress bar and title bar, can you provide the implementation code?"
Tips & Limitations
- Always remember to release the WebView in the
onDestroylifecycle method if you are manually managing instances; failing to do so will cause memory leaks. - The JS Bridge handles allow for pattern matching with wildcards (e.g., 'Life.*'), which is useful for grouping related modules but should be used carefully to avoid accidental access.
- Ensure that all your offline assets are correctly hashed and manifest-registered to prevent loading stale resources.
- Preloading too many WebViews at once can lead to significant memory consumption, so keep your
poolSizebalanced based on the target devices' RAM capacity.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-hefuwei-95-yzturbo-web-android": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution, network-access