fetchResource

LynxEngine internally calls this method to obtain the general resource content, and the return result is required to be the resource content byte[] type.

Syntax

Android

public abstract void fetchResource(
    LynxResourceRequest request, LynxResourceCallback<byte[]> callback);

Parameters

  • request: Request for the requiring resource.
  • callback: Contents of the requiring resource.
NOTE
  • This method must be implemented.

iOS

- (dispatch_block_t)fetchResource:(nonnull LynxResourceRequest *)request
                       onComplete:(LynxGenericResourceCompletionBlock _Nonnull)callback;

Parameters

  • request: Request for the requiring resource.
  • callback: Contents of the requiring resource.
NOTE
  • This method must be implemented.

Harmony

abstract fetchResource(request: LynxResourceRequest, callback: AsyncCallback<ArrayBuffer>): void;

Parameters

  • request: Request to obtain the general resource content.
  • callback: Containing contents of the requiring resource.

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.