Maintain the extension platform

July 29, 2026 · View on GitHub

简体中文 · Extension docs

Start from the failure the user can see, then follow the call path to the first owning component. To build an independent APK, use the extension developer guide instead.

Where did the flow stop?

An external extension call has four stages:

discover extension Service -> user authorizes -> invoke Hook -> host applies result
Visible symptomStart hereClosest validation
Service discovery returns an empty listAndroidExtensionDiscoveryExternalExtensionIpcTest
It appears, but cannot be enabled or disconnects after an updateExtensionPluginRepositoryImpl, AndroidBoundExtensionTransportExtensionTrustStoreTest, ExtensionConnectionStateTest, and ExternalExtensionIpcTest
A Hook is not called, times out, or is incompatibleExtensionRuntime, ExtensionContractCatalogExtensionRuntimeTest
The Hook succeeds but UI, Room, or playback does not changeThe calling repository and its importer or rendererThe adjacent repository/importer test

For Emby/Jellyfin subscription, refresh, or playback failures, start at SubscriptionProviderRepositoryImpl. They are built-in extensions and do not use Android IPC.

Answer four questions before editing

  1. Which user action triggers this flow?
  2. Which HookSpec does it invoke?
  3. Who validates and applies the result?
  4. What is the smallest visible acceptance result?

If any answer is missing, the flow usually still lacks a real host caller or result applicator.

Three boundaries

  • An extension returns candidate data; it does not directly modify Room, UI, or the player.
  • One extension's failure must not delete another extension's data or its own last successful data.
  • Built-in and APK extensions share the same Hook contracts; only the APK path crosses Android IPC.

Use Current architecture and code map to trace a complete path, Change by task before editing, and Extension UI quality gates for any plugin-facing phone, tablet, or TV change. Read Current status and release gate only when deciding whether a capability is open or releasable.