SdkSandboxManager.RemoteSdkCallback

public static interface SdkSandboxManager.RemoteSdkCallback

android.app.sdksandbox.SdkSandboxManager.RemoteSdkCallback


A callback for tracking events regarding loading and interacting with SDKs.

Callback is registered to SdkSandboxManager at the moment of loading a new SDK by passing an implementation of this callback to SdkSandboxManager#loadSdk(String, Bundle, Executor, RemoteSdkCallback).

Summary

Public methods

abstract void onLoadSdkFailure(int errorCode, String errorMsg)

This notifies client application that the requested Sdk is failed to be loaded.

abstract void onLoadSdkSuccess(Bundle params)

This notifies client application that the requested Sdk is successfully loaded.

abstract void onSurfacePackageError(int errorCode, String errorMsg)

This notifies client application that requesting SurfacePackage has failed.

abstract void onSurfacePackageReady(SurfaceControlViewHost.SurfacePackage surfacePackage, int surfacePackageId, Bundle params)

This notifies client application that SurfacePackage is ready to remote render view from the SDK.

Public methods

onLoadSdkFailure

public abstract void onLoadSdkFailure (int errorCode, 
                String errorMsg)

This notifies client application that the requested Sdk is failed to be loaded.

Parameters
errorCode int: int code for the error Value is SdkSandboxManager.LOAD_SDK_NOT_FOUND, SdkSandboxManager.LOAD_SDK_ALREADY_LOADED, or SdkSandboxManager.LOAD_SDK_INTERNAL_ERROR

errorMsg String: a String description of the error This value cannot be null.

onLoadSdkSuccess

public abstract void onLoadSdkSuccess (Bundle params)

This notifies client application that the requested Sdk is successfully loaded.

Parameters
params Bundle: list of params returned from Sdk to the App. This value cannot be null.

onSurfacePackageError

public abstract void onSurfacePackageError (int errorCode, 
                String errorMsg)

This notifies client application that requesting SurfacePackage has failed.

Parameters
errorCode int: int code for the error Value is SdkSandboxManager.REQUEST_SURFACE_PACKAGE_INTERNAL_ERROR

errorMsg String: a String description of the error This value cannot be null.

onSurfacePackageReady

public abstract void onSurfacePackageReady (SurfaceControlViewHost.SurfacePackage surfacePackage, 
                int surfacePackageId, 
                Bundle params)

This notifies client application that SurfacePackage is ready to remote render view from the SDK.

Parameters
surfacePackage SurfaceControlViewHost.SurfacePackage: the requested surface package by SdkSandboxManager#requestSurfacePackage(String, int, int, int, Bundle) This value cannot be null.

surfacePackageId int: a unique id for the SurfacePackage surfacePackage

params Bundle: list of params returned from Sdk to the App. This value cannot be null.