AppOwnedSdkSandboxInterface


class AppOwnedSdkSandboxInterface : Parcelable
kotlin.Any
   ↳ android.app.sdksandbox.AppOwnedSdkSandboxInterface

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 AppOwnedSdkSandboxInterface.

The app registers the AppOwnedSdkSandboxInterfaces using android.app.sdksandbox.SdkSandboxManager#registerAppOwnedSdkSandboxInterface.

The SDK in sandbox process can then query the list of registered AppOwnedSdkSandboxInterfaces using android.app.sdksandbox.sdkprovider.SdkSandboxController#getAppOwnedSdkSandboxInterfaces.

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

Summary

Inherited constants
Public constructors
AppOwnedSdkSandboxInterface(name: String, version: Long, binder: IBinder)

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

IBinder

Returns binder object associated with AppOwnedSdkSandboxInterface.

String

Returns the name used to register the AppOwnedSdkSandboxInterface.

Long

Returns the version used to register the AppOwnedSdkSandboxInterface.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AppOwnedSdkSandboxInterface!>

Public constructors

AppOwnedSdkSandboxInterface

AppOwnedSdkSandboxInterface(
    name: String,
    version: Long,
    binder: IBinder)
Parameters
name String: This value cannot be null.
binder IBinder: This value cannot be null.

Public methods

describeContents

fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getInterface

fun getInterface(): IBinder

Returns binder object associated with AppOwnedSdkSandboxInterface.

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

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

Return
IBinder This value cannot be null.

getName

fun getName(): String

Returns the name used to register the AppOwnedSdkSandboxInterface.

App can register only one interface of given name.

Return
String This value cannot be null.

getVersion

fun getVersion(): Long

Returns the version used to register the AppOwnedSdkSandboxInterface.

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

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties