Overview of Shadow Android Plugin Framework
masterShadow is an Android plugin framework developed by Tencent, designed to support large-scale production environments. Unlike many other frameworks, Shadow focuses on high compatibility and minimal host impact.
Key Features:
- Source Code Reuse: Plugin App source code can be installed and run normally without modification.
- Zero Reflection/No Hack Implementation: Does not rely on hidden system APIs or reflection, making it compatible with Google's restrictions on non-public SDK interfaces.
- Fully Dynamic Framework: The plugin framework code is part of the plugin itself. This allows the framework to be updated dynamically via the plugin without requiring a new host app build.
- Minimal Host Footprint: The code required in the host application is extremely small (~15KB, ~160 methods).
- Kotlin Implementation: Core components like
core.loaderandcore.transformare implemented in Kotlin for maintainability.
Supported Capabilities:
- Four major Android components (Activity, Service, etc.)
- Fragments (via both code and XML)
- DataBinding (works out-of-the-box)
- Cross-process usage of plugin Services
- Custom Themes
- Accessing host classes from plugins
- SO (Native library) loading
- Segmented loading (loading multiple APKs or dependent APKs)
- Loading multiple Views from different APKs within a single Activity