SdkSandboxController


public class SdkSandboxController
extends Object

java.lang.Object
   ↳ android.app.sdksandbox.sdkprovider.SdkSandboxController


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

String SDK_SANDBOX_CONTROLLER_SERVICE

Public methods

List<AppOwnedSdkSandboxInterface> getAppOwnedSdkSandboxInterfaces()

Fetches all AppOwnedSdkSandboxInterface that are registered by the app.

String getClientPackageName()

Returns the package name of the client app.

SharedPreferences getClientSharedPreferences()

Returns SharedPreferences containing data synced from the client app.

List<SandboxedSdk> getSandboxedSdks()

Fetches information about Sdks that are loaded in the sandbox.

void loadSdk(String sdkName, Bundle params, Executor executor, OutcomeReceiver<SandboxedSdkLoadSdkException> receiver)

Loads SDK in an SDK sandbox java process.

IBinder registerSdkSandboxActivityHandler(SdkSandboxActivityHandler sdkSandboxActivityHandler)

Returns an identifier for a SdkSandboxActivityHandler after registering it.

void registerSdkSandboxClientImportanceListener(Executor executor, SdkSandboxClientImportanceListener listener)

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

void unregisterSdkSandboxActivityHandler(SdkSandboxActivityHandler sdkSandboxActivityHandler)

Unregister an already registered SdkSandboxActivityHandler.

void unregisterSdkSandboxClientImportanceListener(SdkSandboxClientImportanceListener listener)

Unregisters a listener previously registered.

Inherited methods

Constants

SDK_SANDBOX_CONTROLLER_SERVICE

Added in API level 34
Also in Ad Services Extensions 5
Deprecated in API level 37
public static final String SDK_SANDBOX_CONTROLLER_SERVICE

Constant Value: "sdk_sandbox_controller_service"

Public methods

getAppOwnedSdkSandboxInterfaces

Added in API level 35
Also in Ad Services Extensions 8
Deprecated in API level 37
public List<AppOwnedSdkSandboxInterface> getAppOwnedSdkSandboxInterfaces ()

Fetches all AppOwnedSdkSandboxInterface that are registered by the app.

Returns
List<AppOwnedSdkSandboxInterface> This value cannot be null.

getClientPackageName

Added in API level 35
Also in Ad Services Extensions 8
Deprecated in API level 37
public String getClientPackageName ()

Returns the package name of the client app.

Returns
String This value cannot be null.

getClientSharedPreferences

Added in API level 34
Also in Ad Services Extensions 5
Deprecated in API level 37
public SharedPreferences getClientSharedPreferences ()

Returns SharedPreferences containing data synced from the client app.

Returns
SharedPreferences This value cannot be null.

getSandboxedSdks

Added in API level 34
Also in Ad Services Extensions 5
Deprecated in API level 37
public List<SandboxedSdk> getSandboxedSdks ()

Fetches information about Sdks that are loaded in the sandbox.

Returns
List<SandboxedSdk> This value cannot be null.

loadSdk

Added in API level 35
Also in Ad Services Extensions 10
Deprecated in API level 37
public void loadSdk (String sdkName, 
                Bundle params, 
                Executor executor, 
                OutcomeReceiver<SandboxedSdkLoadSdkException> receiver)

Loads SDK in an SDK sandbox java process.

Parameters
sdkName String: This value cannot be null.

params Bundle: This value cannot be null.

executor Executor: This value cannot be null.
Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

receiver OutcomeReceiver: This value cannot be null.

registerSdkSandboxActivityHandler

Added in API level 34
Also in Ad Services Extensions 7
Deprecated in API level 37
public IBinder registerSdkSandboxActivityHandler (SdkSandboxActivityHandler sdkSandboxActivityHandler)

Returns an identifier for a SdkSandboxActivityHandler after registering it.

Parameters
sdkSandboxActivityHandler SdkSandboxActivityHandler: This value cannot be null.

Returns
IBinder This value cannot be null.

registerSdkSandboxClientImportanceListener

Added in API level 36
Also in Ad Services Extensions 14
Deprecated in API level 37
public void registerSdkSandboxClientImportanceListener (Executor executor, 
                SdkSandboxClientImportanceListener listener)

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

Parameters
executor Executor: This value cannot be null.
Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

listener SdkSandboxClientImportanceListener: This value cannot be null.

unregisterSdkSandboxActivityHandler

Added in API level 34
Also in Ad Services Extensions 7
Deprecated in API level 37
public void unregisterSdkSandboxActivityHandler (SdkSandboxActivityHandler sdkSandboxActivityHandler)

Unregister an already registered SdkSandboxActivityHandler.

Parameters
sdkSandboxActivityHandler SdkSandboxActivityHandler: This value cannot be null.

Returns
void This value cannot be null.

unregisterSdkSandboxClientImportanceListener

Added in API level 36
Also in Ad Services Extensions 14
Deprecated in API level 37
public void unregisterSdkSandboxClientImportanceListener (SdkSandboxClientImportanceListener listener)

Unregisters a listener previously registered.

Parameters
listener SdkSandboxClientImportanceListener: This value cannot be null.