{% setvar book_path %}/android/reference/kotlin/_book.yaml{% endsetvar %} {% include "/android/_dackka-meta-tags.html" %}

Batch.Builder

{% setvar page_path %}com/google/android/gms/common/api/Batch.Builder.html{% endsetvar %} {% setvar doc_root_path %}/android/reference{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "android/_kotlin_switcher2.md" %}

class Batch.Builder


Builder for Batch objects. Note that this class is not thread-safe, by design.

Summary

Public constructors

Builder(googleApiClient: GoogleApiClient!)

Public functions

BatchResultToken<R!>!
<R : Result?> add(pendingResult: PendingResult<R!>!)

Adds a PendingResult to the batch.

Batch!

Public constructors

Builder

Builder(googleApiClient: GoogleApiClient!)

Public functions

add

fun <R : Result?> add(pendingResult: PendingResult<R!>!): BatchResultToken<R!>!

Adds a PendingResult to the batch. The returned token can be used to retrieve the result from the BatchResult passed to the result callback.

Parameters
pendingResult: PendingResult<R!>!

Items to wait for completion of.

Returns
BatchResultToken<R!>!

The result token to use to get the result from the BatchResult.

build

fun build(): Batch!