GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

IBlazeHostingAppContextManager

Interface defining methods for managing a hosting app's context.

This interface allows storing, retrieving, updating, and deleting key-value pairs in the hosting application's context. It provides a way to manage shared data within the SDK.

Methods

getValue

Retrieves the value associated with the given key.

Parameters:

  • key: The key for which to retrieve the value.

Returns:

  • The associated value, or null if no value exists for the key.
fun getValue(key: String): Any?

getContext

Retrieves the entire context as a map.

Returns:

  • A map representing the current context.
fun getContext(): Map<String, Any>

setValue

Stores a value for the specified key in the context.

Parameters:

  • key: The key under which to store the value.
  • value: The value to store. Passing null removes the key.

Returns:

  • The associated value, or null if no value exists for the key.
fun setValue(key: String, value: Any?)

setContext

Replaces the entire context with a new map.

Parameters:

  • context: A map containing key-value pairs to set as the new context.
fun setContext(context: Map<String, Any>)

deleteValue

Deletes the value associated with the given key.

Parameters:

  • key: The key whose value should be removed.
fun deleteValue(key: String): Any?

Did this page help you?