For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/lynx-native-api/lynx-background-runtime/add-lynx-background-runtime-client.md.
Lynx
  • 简体中文
  • addLynxBackgroundRuntimeClient

    LynxBackgroundRuntime 注册生命周期事件监听。

    语法

    Android

    public void addLynxBackgroundRuntimeClient(LynxBackgroundRuntimeClient client);

    参数说明

    • client: 客户端实现的结构,并注册给 LynxBackgroundRuntime 实例,用于获取后台运行时生命周期各流程回调。

    iOS

    - (void)addLifecycleClient:(nonnull id<LynxBackgroundRuntimeLifecycle>)lifecycleClient;

    参数说明

    • lifecycleClient: 客户端实现的结构,并注册给 LynxBackgroundRuntime 实例,用于获取后台运行时生命周期各流程回调。

    Harmony

    public addLifecycleClient(client: LynxBackgroundRuntimeClient): void;

    参数说明

    • client: 客户端实现,并注册给 LynxBackgroundRuntime 实例,用于接收生命周期回调。

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。