For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/lynx-native-api/lynx-template-resource-fetcher/fetch-template.md.
Lynx
  • English
  • fetchTemplate

    LynxEngine internally calls this method to obtain the contents of Bundle and Lazy Bundle. The returned result type can contain byte[] or TemplateBundle.

    Syntax

    Android

    public abstract void fetchTemplate(
        LynxResourceRequest request, LynxResourceCallback<TemplateProviderResult> callback);

    Parameters

    • request: Request for the requiring content file.
    • callback: Response with the requiring content file: byteArray or TemplateBundle
    Note
    • This method must be implemented.

    iOS

    - (void)fetchTemplate:(LynxResourceRequest *_Nonnull)request
               onComplete:(LynxTemplateResourceCompletionBlock _Nonnull)callback;

    Parameters

    • request: Request for the requiring content file.
    • callback: Response with the requiring content file: byteArray or TemplateBundle
    Note
    • This method must be implemented.

    Harmony

    abstract fetchTemplate(request: LynxResourceRequest, callback: AsyncCallback<TemplateProviderResult>): void;

    Parameters

    • request: Request to obtain the contents of Bundle and Lazy Bundle
    • callback: Response with the requiring content file in ArrayBuffer type.

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.