Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 5](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#constants) \| [Methods](https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#inhmethods)

# SdkSandboxController

*** ** * ** ***


`
public


class
SdkSandboxController
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.sdksandbox.sdkprovider.SdkSandboxController |

<br />

*** ** * ** ***


**This class was deprecated
in API level 37.**   

The SDK sandbox is no longer supported.

Controller that is used by SDK loaded in the sandbox to access information provided by the sdk
sandbox.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#SDK_SANDBOX_CONTROLLER_SERVICE` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/sdksandbox/AppOwnedSdkSandboxInterface>` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#getAppOwnedSdkSandboxInterfaces()() ` Fetches all `https://developer.android.com/reference/android/app/sdksandbox/AppOwnedSdkSandboxInterface` that are registered by the app. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#getClientPackageName()() ` Returns the package name of the client app. |
| ` https://developer.android.com/reference/android/content/SharedPreferences` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#getClientSharedPreferences()() ` Returns `https://developer.android.com/reference/android/content/SharedPreferences` containing data synced from the client app. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/sdksandbox/SandboxedSdk>` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#getSandboxedSdks()() ` Fetches information about Sdks that are loaded in the sandbox. |
| ` void` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#loadSdk(java.lang.String,%20android.os.Bundle,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.app.sdksandbox.SandboxedSdk,android.app.sdksandbox.LoadSdkException>)(https://developer.android.com/reference/java/lang/String sdkName, https://developer.android.com/reference/android/os/Bundle params, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/app/sdksandbox/SandboxedSdk, https://developer.android.com/reference/android/app/sdksandbox/LoadSdkException> receiver) ` Loads SDK in an SDK sandbox java process. |
| ` https://developer.android.com/reference/android/os/IBinder` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#registerSdkSandboxActivityHandler(android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler)(https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxActivityHandler sdkSandboxActivityHandler) ` Returns an identifier for a `https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxActivityHandler` after registering it. |
| ` void` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#registerSdkSandboxClientImportanceListener(java.util.concurrent.Executor,%20android.app.sdksandbox.sdkprovider.SdkSandboxClientImportanceListener)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxClientImportanceListener listener) ` Registers a listener to be notified of changes in the client's process importance. |
| ` void` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#unregisterSdkSandboxActivityHandler(android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler)(https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxActivityHandler sdkSandboxActivityHandler) ` Unregister an already registered `https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxActivityHandler`. |
| ` void` | ` https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxController#unregisterSdkSandboxClientImportanceListener(android.app.sdksandbox.sdkprovider.SdkSandboxClientImportanceListener)(https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxClientImportanceListener listener) ` Unregisters a listener previously registered. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Constants

### SDK_SANDBOX_CONTROLLER_SERVICE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 5](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String SDK_SANDBOX_CONTROLLER_SERVICE
```

<br />

<br />

Constant Value:

"sdk_sandbox_controller_service"


## Public methods

### getAppOwnedSdkSandboxInterfaces

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<AppOwnedSdkSandboxInterface> getAppOwnedSdkSandboxInterfaces ()
```

Fetches all `https://developer.android.com/reference/android/app/sdksandbox/AppOwnedSdkSandboxInterface` that are registered by the app.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/sdksandbox/AppOwnedSdkSandboxInterface>` | This value cannot be `null`. <br /> |

### getClientPackageName

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getClientPackageName ()
```

Returns the package name of the client app.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getClientSharedPreferences

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 5](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SharedPreferences getClientSharedPreferences ()
```

Returns `https://developer.android.com/reference/android/content/SharedPreferences` containing data synced from the client app.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/SharedPreferences` | This value cannot be `null`. <br /> |

### getSandboxedSdks

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 5](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<SandboxedSdk> getSandboxedSdks ()
```

Fetches information about Sdks that are loaded in the sandbox.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/sdksandbox/SandboxedSdk>` | This value cannot be `null`. <br /> |

### loadSdk

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void loadSdk (String sdkName, 
                Bundle params, 
                Executor executor, 
                OutcomeReceiver<SandboxedSdk, LoadSdkException> receiver)
```

Loads SDK in an SDK sandbox java process.

<br />

| Parameters ||
|---|---|
| `sdkName` | `String`: This value cannot be `null`. <br /> |
| `params` | `Bundle`: This value cannot be `null`. <br /> |
| `executor` | `Executor`: This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `receiver` | `OutcomeReceiver`: This value cannot be `null`. <br /> |

### registerSdkSandboxActivityHandler

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 7](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IBinder registerSdkSandboxActivityHandler (SdkSandboxActivityHandler sdkSandboxActivityHandler)
```

Returns an identifier for a `https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxActivityHandler` after registering it.

<br />

| Parameters ||
|---|---|
| `sdkSandboxActivityHandler` | `SdkSandboxActivityHandler`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/IBinder` | This value cannot be `null`. <br /> |

### registerSdkSandboxClientImportanceListener

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void registerSdkSandboxClientImportanceListener (Executor executor, 
                SdkSandboxClientImportanceListener listener)
```

Registers a listener to be notified of changes in the client's process importance.

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `listener` | `SdkSandboxClientImportanceListener`: This value cannot be `null`. <br /> |

### unregisterSdkSandboxActivityHandler

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 7](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void unregisterSdkSandboxActivityHandler (SdkSandboxActivityHandler sdkSandboxActivityHandler)
```

Unregister an already registered `https://developer.android.com/reference/android/app/sdksandbox/sdkprovider/SdkSandboxActivityHandler`.

<br />

| Parameters ||
|---|---|
| `sdkSandboxActivityHandler` | `SdkSandboxActivityHandler`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `void` | This value cannot be `null`. <br /> |

### unregisterSdkSandboxClientImportanceListener

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void unregisterSdkSandboxClientImportanceListener (SdkSandboxClientImportanceListener listener)
```

Unregisters a listener previously registered.

<br />

| Parameters ||
|---|---|
| `listener` | `SdkSandboxClientImportanceListener`: This value cannot be `null`. <br /> |