AppOwnedSdkSandboxInterfaceCompat


public final class AppOwnedSdkSandboxInterfaceCompat


Represents a channel for an SDK in the sandbox process to interact with the app.

The SDK and the app can agree on a binder interface to be implemented by the app and shared via an object of AppOwnedSdkSandboxInterfaceCompat.

The app registers the AppOwnedSdkSandboxInterfaces using SdkSandboxManagerCompat. The SDK can then query the list of registered interfaces using SdkSandboxControllerCompat.

Once SDK has the AppOwnedSdkSandboxInterfaceCompat it wants to communicate with, it will have to cast the binder object from getInterface to the prearranged interface before initiating the communication.

Summary

Public constructors

AppOwnedSdkSandboxInterfaceCompat(
    @NonNull String name,
    long version,
    @NonNull IBinder binder
)

Public methods

final @NonNull IBinder

Returns binder object associated with AppOwnedSdkSandboxInterfaceCompat.

final @NonNull String

Returns the name used to register the AppOwnedSdkSandboxInterfaceCompat.

final long

Returns the version used to register the AppOwnedSdkSandboxInterfaceCompat.

Public constructors

AppOwnedSdkSandboxInterfaceCompat

Added in 1.0.0-alpha13
public AppOwnedSdkSandboxInterfaceCompat(
    @NonNull String name,
    long version,
    @NonNull IBinder binder
)

Public methods

getInterface

Added in 1.0.0-alpha13
public final @NonNull IBinder getInterface()

Returns binder object associated with AppOwnedSdkSandboxInterfaceCompat.

The SDK and the app can agree on a binder interface to be implemented by the app and shared via this object.

The SDK in the sandbox will have to cast the binder object received from this method to the agreed upon interface before using it.

getName

Added in 1.0.0-alpha13
public final @NonNull String getName()

Returns the name used to register the AppOwnedSdkSandboxInterfaceCompat.

App can register only one interface of given name.

getVersion

Added in 1.0.0-alpha13
public final long getVersion()

Returns the version used to register the AppOwnedSdkSandboxInterfaceCompat.

A version may be chosen by an app, and used to communicate any updates the app makes to this implementation.