SandboxedSdkContext

public final class SandboxedSdkContext
extends ContextWrapper

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.sdksandbox.SandboxedSdkContext


Refers to the context of the SDK loaded in the SDK sandbox process.

It is a wrapper of the client application (which loading SDK to the sandbox) context, to represent the context of the SDK loaded by that application.

This context contains methods that an SDK loaded into sdk sandbox can use to interact with the sdk sandbox process, or other SDKs loaded into the same sdk sandbox process.

An instance of the SandboxedSdkContext will be created by the SDK sandbox, and then passed to the SandboxedSdkProvider#initSdk(SandboxedSdkContext, Bundle, Executor, SandboxedSdkProvider.InitSdkCallback) after SDK is loaded.

Note: All APIs defined in this class are not stable and subject to change.

Summary

Inherited constants

Public constructors

SandboxedSdkContext(Context baseContext, ApplicationInfo info, String sdkName)

Public methods

AssetManager getAssets()

Returns the assets defined in the SDK's .apk file.

Resources getResources()

Returns the resources defined in the SDK's .apk file.

Inherited methods

Public constructors

SandboxedSdkContext

public SandboxedSdkContext (Context baseContext, 
                ApplicationInfo info, 
                String sdkName)

Parameters
baseContext Context: This value cannot be null.

info ApplicationInfo: This value cannot be null.

sdkName String: This value cannot be null.

Public methods

getAssets

public AssetManager getAssets ()

Returns the assets defined in the SDK's .apk file.

Returns
AssetManager This value may be null.

getResources

public Resources getResources ()

Returns the resources defined in the SDK's .apk file.

Returns
Resources This value may be null.