Added in API level 34

Builder


class Builder
kotlin.Any
   ↳ android.media.tv.TableResponse.Builder

Builder for TableResponse.

Summary

Public constructors
Builder(requestId: Int, sequence: Int, responseResult: Int, version: Int, size: Int)

Constructs a Builder object of TableResponse.

Public methods
TableResponse

Builds a TableResponse object.

TableResponse.Builder

Sets table byte array.

TableResponse.Builder

Sets table shared memory.

TableResponse.Builder

Sets table URI.

Public constructors

Builder

Added in API level 34
Builder(
    requestId: Int,
    sequence: Int,
    responseResult: Int,
    version: Int,
    size: Int)

Constructs a Builder object of TableResponse.

Parameters
requestId Int: The ID is used to associate the response with the request.
sequence Int: The sequence number which indicates the order of related responses.
responseResult Int: The result for the response. It's one of RESPONSE_RESULT_OK, RESPONSE_RESULT_CANCEL, RESPONSE_RESULT_ERROR. Value is android.media.tv.BroadcastInfoResponse#RESPONSE_RESULT_ERROR, android.media.tv.BroadcastInfoResponse#RESPONSE_RESULT_OK, or android.media.tv.BroadcastInfoResponse#RESPONSE_RESULT_CANCEL
version Int: The version number of requested table.
size Int: The Size number of table in bytes.

Public methods

build

Added in API level 34
fun build(): TableResponse

Builds a TableResponse object.

Return
TableResponse This value cannot be null.

setTableByteArray

Added in API level 34
fun setTableByteArray(bytes: ByteArray): TableResponse.Builder

Sets table byte array.

For a single builder instance, at most one of table URI, table byte array, and table shared memory can be set. If more than one are set, only the last call takes precedence and others are reset to null.

Parameters
bytes ByteArray: The byte array which stores the table in bytes. The structure and syntax of the table depends on the table name in TableRequest.getTableName() and the corresponding standard. This value cannot be null.

setTableSharedMemory

Added in API level 34
fun setTableSharedMemory(sharedMemory: SharedMemory): TableResponse.Builder

Sets table shared memory.

For a single builder instance, at most one of table URI, table byte array, and table shared memory can be set. If more than one are set, only the last call takes precedence and others are reset to null.

Parameters
sharedMemory SharedMemory: The shared memory which stores the table. The table size can be large so using a shared memory optimizes the data communication between the table data source and the receiver. The structure syntax of the table depends on the table name in TableRequest.getTableName() and the corresponding standard. This value cannot be null.

setTableUri

Added in API level 34
fun setTableUri(uri: Uri): TableResponse.Builder

Sets table URI.

For a single builder instance, at most one of table URI, table byte array, and table shared memory can be set. If more than one are set, only the last call takes precedence and others are reset to null.

Parameters
uri Uri: The URI of the table. This value cannot be null.