# AppOwnedSdkSandboxInterfaceCompat

Artifact:[androidx.privacysandbox.sdkruntime:sdkruntime-core](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime)  
[View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat.kt+class:androidx.privacysandbox.sdkruntime.core.AppOwnedSdkSandboxInterfaceCompat)  
Added in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  
Deprecated in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat "View this page in Java")

<br />

```
class AppOwnedSdkSandboxInterfaceCompat
```

<br />

*** ** * ** ***

| **This class is deprecated.**   
| This library is no longer supported.

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](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/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](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat)it wants to communicate with, it will have to cast the binder object from[getInterface](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getInterface())to the prearranged interface before initiating the communication.

## Summary

|                                                                                                                                                                                                                                                                                            ### Public constructors                                                                                                                                                                                                                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ~~[AppOwnedSdkSandboxInterfaceCompat](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#AppOwnedSdkSandboxInterfaceCompat(kotlin.String,kotlin.Long,android.os.IBinder))~~`(` ` name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`,` ` version: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` binder: `[IBinder](https://developer.android.com/reference/android/os/IBinder.html) `)` **This function is deprecated.**This library is no longer supported. |

|                               ### Public functions                                |
|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IBinder](https://developer.android.com/reference/android/os/IBinder.html)        | ~~[getInterface](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getInterface())~~`()` **This function is deprecated.**This library is no longer supported. |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | ~~[getName](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getName())~~`()` **This function is deprecated.**This library is no longer supported.           |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)     | ~~[getVersion](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getVersion())~~`()` **This function is deprecated.**This library is no longer supported.     |

## Public constructors

### AppOwnedSdkSandboxInterfaceCompat

Added in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  
Deprecated in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  

```
[AppOwnedSdkSandboxInterfaceCompat](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#AppOwnedSdkSandboxInterfaceCompat(kotlin.String,kotlin.Long,android.os.IBinder))(
    name: String,
    version: Long,
    binder: IBinder
)
```
| **This function is deprecated.**   
This library is no longer supported.  

## Public functions

### getInterface

Added in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  
Deprecated in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  

```
fun [getInterface](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getInterface())(): IBinder
```
| **This function is deprecated.**   
| This library is no longer supported.

Returns binder object associated with[AppOwnedSdkSandboxInterfaceCompat](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/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-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  
Deprecated in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  

```
fun [getName](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getName())(): String
```
| **This function is deprecated.**   
| This library is no longer supported.

Returns the name used to register the[AppOwnedSdkSandboxInterfaceCompat](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat).

App can register only one interface of given name.  

### getVersion

Added in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  
Deprecated in[1.0.0-alpha19](https://developer.android.com/jetpack/androidx/releases/privacysandbox-sdkruntime#1.0.0-alpha19)  

```
fun [getVersion](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat#getVersion())(): Long
```
| **This function is deprecated.**   
| This library is no longer supported.

Returns the version used to register the[AppOwnedSdkSandboxInterfaceCompat](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/AppOwnedSdkSandboxInterfaceCompat).

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