SdkSandboxController
public
class
SdkSandboxController
extends Object
java.lang.Object | |
↳ | android.app.sdksandbox.SdkSandboxController |
Controller that is used by SDK loaded in the SDK Sandbox to access information provided by the SDK Sandbox.
It enables the SDK to communicate with other SDKS in the SDK sandbox and know about the state of the sdks that are currently loaded in it.
An instance of SdkSandboxController
can be obtained using Context.getSystemService(Class
and class
. The Context
can in turn
be obtained using SandboxedSdkProvider.getContext()
.
Summary
Constants | |
---|---|
String |
SDK_SANDBOX_CONTROLLER_SERVICE
|
Public methods | |
---|---|
SharedPreferences
|
getClientSharedPreferences()
Returns |
List<SandboxedSdk>
|
getSandboxedSdks()
Fetches information about Sdks that are loaded in the sandbox. |
Inherited methods | |
---|---|
Constants
SDK_SANDBOX_CONTROLLER_SERVICE
public static final String SDK_SANDBOX_CONTROLLER_SERVICE
Constant Value: "sdk_sandbox_controller_service"
Public methods
getClientSharedPreferences
public SharedPreferences getClientSharedPreferences ()
Returns SharedPreferences
containing data synced from the client app.
Keys that have been synced by the client app using SdkSandboxManager.addSyncedSharedPreferencesKeys(Set)
can be found in this SharedPreferences
.
The returned SharedPreferences
should only be read. Writing to it is not
supported.
Returns | |
---|---|
SharedPreferences |
SharedPreferences containing data synced from client app.
This value cannot be null . |
Throws | |
---|---|
UnsupportedOperationException |
if the controller is obtained from an unexpected
context. Use SandboxedSdkProvider#getContext() for the right context |
getSandboxedSdks
public List<SandboxedSdk> getSandboxedSdks ()
Fetches information about Sdks that are loaded in the sandbox.
Returns | |
---|---|
List<SandboxedSdk> |
List of SandboxedSdk containing all currently loaded sdks
This value cannot be null . |
Throws | |
---|---|
UnsupportedOperationException |
if the controller is obtained from an unexpected
context. Use SandboxedSdkProvider#getContext() for the right context |