setContext

Sets specific context information without value.

Parameters

name

Name of context information.


fun setContext(name: String, value: Int)
fun setContext(name: String, value: Long)
fun setContext(name: String, value: Float)
fun setContext(name: String, value: Double)
fun setContext(name: String, value: Boolean)
fun setContext(name: String, value: String)

Sets specific context information.

Note:

  • If value is a String type, it can have a maximum length of 1024 characters.

Parameters

name

Name of context information.

value

Value of context information.


fun setContext(name: String, key: String, value: Int)
fun setContext(name: String, key: String, value: Long)
fun setContext(name: String, key: String, value: Float)
fun setContext(name: String, key: String, value: Double)
fun setContext(name: String, key: String, value: Boolean)
fun setContext(name: String, key: String, value: String)

Sets specific context item of key-value information.

Note:

  • The information can have a maximum of 100 key-value pairs.

  • The key must be a String type and can have a maximum length of 128 characters.

  • The key must satisfy the regular expression ^[a-zA-Z_][a-zA-Z0-9_]*$.

  • The value must be of String or Numeric or Boolean type.

  • If value is a String type, it can have a maximum length of 1024 characters.

Parameters

name

Name of context information.

key

Key of item of key-value context information.

value

Value of item of key-value context information.