AddonSession.Builder

@PublicApi
public interface AddonSession.Builder



AddonSession のビルダー。newSessionBuilderをご確認ください。

まとめ

パブリック メソッド

abstract ListenableFuture<AddonSession>
begin(Context appContext)

アドオン セッションを開始します。

abstract AddonSession.Builder

初期状態でアドオン セッションに共同実行を追加します。

abstract AddonSession.Builder
@CanIgnoreReturnValue
withCoDoing(
    CoDoingHandler coDoingHandler,
    Optional<CoDoingState> initiatorInitialState
)

アドオン セッションに共同行動を追加します。

abstract AddonSession.Builder

アドオン セッションに同時視聴を追加します。

abstract AddonSession.Builder
@CanIgnoreReturnValue
withCoWatching(
    CoWatchingHandler coWatchingHandler,
    Optional<CoWatchingState> initiatorInitialState
)

初期状態のアドオン セッションに同時視聴を追加します。

abstract AddonSession.Builder

セッションの CollaborationStartingState を設定します。

abstract AddonSession.Builder

他の参加者のメタデータを更新するためのリスナーを登録します。

abstract AddonSession.Builder

この参加者のメタデータを設定し、他の参加者への更新を受け取るためのリスナーを登録します。

パブリック メソッド

begin

abstract ListenableFuture<AddonSessionbegin(Context appContext)

アドオン セッションを開始します。ユーザーがアドオン セッションへの参加を確認した場合にのみ呼び出されます。

会議を作成するか、進行中の会議に接続することで、会議に接続します。注:

  • 会議が作成された場合、最初は現在のユーザーが唯一の参加者になります。
  • ミーティングの詳細には、返されたセッションで getMeetingInfo からアクセスできます。
  • 返される URL は、ユーザーに公開され、目的のアドオン セッション グループで手動で共有されることが想定されています。
同時視聴インスタンスと共同視聴インスタンスには、それぞれ getCoWatchinggetCoDoing からアクセスできます。

この将来の cancel を呼び出すのではなく、最後まで実行できるようにすることをおすすめしません

パラメータ
Context appContext

SDK を使用しているアプリの getApplicationContext

戻り値
ListenableFuture<AddonSession>

ListenableFuture。アドオン セッションが正常に開始された場合に、適切なタイプの AddonSession インスタンスを評価します。それ以外の場合、別の AddonSession がまだ実行中(endSession が呼び出されなかった場合)は IllegalStateException と評価され、予期しないエラーが発生した場合は AddonException と評価されます。

withCoDoing

@CanIgnoreReturnValue
abstract AddonSession.Builder withCoDoing(CoDoingHandler coDoingHandler)

初期状態でアドオン セッションに共同実行を追加します。

パラメータ
CoDoingHandler coDoingHandler

共同編集のコールバック

戻り値
AddonSession.Builder

チェーン用の別のビルダー インスタンス

例外
java.lang.NullPointerException

coDoingHandler が null の場合

withCoDoing

@CanIgnoreReturnValue
abstract AddonSession.Builder withCoDoing(
    CoDoingHandler coDoingHandler,
    Optional<CoDoingState> initiatorInitialState
)

アドオン セッションに共同行動を追加します。

パラメータ
CoDoingHandler coDoingHandler

共同編集のコールバック

Optional<CoDoingState> initiatorInitialState

イニシエータの初期状態です。ユーザーが既存のセッションに参加する場合は無視されます

戻り値
AddonSession.Builder

チェーン用の別のビルダー インスタンス

例外
java.lang.NullPointerException

coDoingHandler または initiatorInitialState が null の場合

withCoWatching

@CanIgnoreReturnValue
abstract AddonSession.Builder withCoWatching(CoWatchingHandler coWatchingHandler)

アドオン セッションに同時視聴を追加します。

パラメータ
CoWatchingHandler coWatchingHandler

同時視聴のコールバック

戻り値
AddonSession.Builder

チェーン用の別のビルダー インスタンス

例外
java.lang.NullPointerException

coWatchingHandler が null の場合

withCoWatching

@CanIgnoreReturnValue
abstract AddonSession.Builder withCoWatching(
    CoWatchingHandler coWatchingHandler,
    Optional<CoWatchingState> initiatorInitialState
)

初期状態のアドオン セッションに同時視聴を追加します。

パラメータ
CoWatchingHandler coWatchingHandler

同時視聴のコールバック

Optional<CoWatchingState> initiatorInitialState

イニシエータの初期状態です。ユーザーが既存のセッションに参加する場合は無視されます

戻り値
AddonSession.Builder

チェーン用の別のビルダー インスタンス

例外
java.lang.NullPointerException

coWatchingHandler または initiatorInitialState が null の場合

withCollaborationStartingState

@CanIgnoreReturnValue
abstract AddonSession.Builder withCollaborationStartingState(
    CollaborationStartingState collaborationStartingState
)

セッションの CollaborationStartingState を設定します。

これは、updateCollaborationStartingState または resetCollaborationStartingState を呼び出して後で変更できます。

パラメータ
CollaborationStartingState collaborationStartingState

データ CollaborationStartingState

例外
java.lang.NullPointerException

collaborationStartingState が null の場合

withParticipantMetadata

@CanIgnoreReturnValue
abstract AddonSession.Builder withParticipantMetadata(ParticipantMetadataHandler handler)

他の参加者のメタデータを更新するためのリスナーを登録します。

ローカルの参加者のメタデータは、最初は空の値に設定されますが、後で updateParticipantMetadata を呼び出すことで設定できます。初期値を設定するには、代わりに withParticipantMetadata を呼び出します。

パラメータ
ParticipantMetadataHandler handler

ParticipantMetadataHandler: 更新されるたびに最新の参加者メタデータ セットを受け取ります。

例外
java.lang.NullPointerException

handler が null の場合

withParticipantMetadata

@CanIgnoreReturnValue
abstract AddonSession.Builder withParticipantMetadata(
    ParticipantMetadataHandler handler,
    byte[] metadata
)

この参加者のメタデータを設定し、他の参加者への更新を受け取るためのリスナーを登録します。

このメタデータは、updateParticipantMetadata を呼び出して後で変更できます。

エンコードされたメタデータは、参加者 1 人あたり MAX_INDIVIDUAL_PARTICIPANT_METADATA_SIZE_BYTES バイトが上限です。

パラメータ
ParticipantMetadataHandler handler

ParticipantMetadataHandler: 更新されるたびに最新の参加者メタデータ セットを受け取ります。

byte[] metadata

ローカルの参加者に関連するメタデータを記述する、エンコードされたメタデータの blob

例外
java.lang.IllegalArgumentException

指定されたメタデータが MAX_INDIVIDUAL_PARTICIPANT_METADATA_SIZE_BYTES バイトを超える場合

java.lang.NullPointerException

handler が null の場合