SandboxedSdkProvider.AttachContext(Context) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the SDK Context
which can then be received using SandboxedSdkProvider#getContext()
.
[Android.Runtime.Register("attachContext", "(Landroid/content/Context;)V", "", ApiSince=34)]
public void AttachContext (Android.Content.Context context);
[<Android.Runtime.Register("attachContext", "(Landroid/content/Context;)V", "", ApiSince=34)>]
member this.AttachContext : Android.Content.Context -> unit
Parameters
- context
- Context
The new base context.
- Attributes
Remarks
Sets the SDK Context
which can then be received using SandboxedSdkProvider#getContext()
. This is called before SandboxedSdkProvider#onLoadSdk
is invoked. No operations requiring a Context
should be performed before then, as SandboxedSdkProvider#getContext
will return null until this method has been called.
Throws IllegalStateException if a base context has already been set.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.