class SandboxedSdkCompat


Compat wrapper for SandboxedSdk. Represents an SDK loaded in the sandbox process or locally. An application should use this object to obtain an interface to the SDK through getInterface.

The SDK should create it when SandboxedSdkProviderCompat.onLoadSdk is called, and drop all references to it when SandboxedSdkProviderCompat.beforeUnloadSdk is called. Additionally, the SDK should fail calls made to the IBinder returned from getInterface after SandboxedSdkProviderCompat.beforeUnloadSdk has been called.

See also
SandboxedSdk

Summary

Public constructors

SandboxedSdkCompat(sdkInterface: IBinder)

Creates SandboxedSdkCompat from SDK Binder object.

Public functions

IBinder?

Returns the interface to the loaded SDK.

SandboxedSdkInfo?

Returns information about loaded SDK.

Public constructors

SandboxedSdkCompat

Added in 1.0.0-alpha15
SandboxedSdkCompat(sdkInterface: IBinder)

Creates SandboxedSdkCompat from SDK Binder object.

Parameters
sdkInterface: IBinder

The SDK's interface. This will be the entrypoint into the sandboxed SDK for the application. The SDK should keep this valid until it's loaded in the sandbox, and start failing calls to this interface once it has been unloaded

This interface can later be retrieved using getInterface.

See also
SandboxedSdk

Public functions

getInterface

Added in 1.0.0-alpha15
fun getInterface(): IBinder?

Returns the interface to the loaded SDK. A null interface is returned if the Binder has since become unavailable, in response to the SDK being unloaded.

Returns
IBinder?

IBinder object for loaded SDK.

See also
getInterface

getSdkInfo

Added in 1.0.0-alpha15
fun getSdkInfo(): SandboxedSdkInfo?

Returns information about loaded SDK.

Returns
SandboxedSdkInfo?

SandboxedSdkInfo object for loaded SDK or null if no information available.