AddonSessionHandler

@PublicApi
interface AddonSessionHandler


セッション用にアドオンアプリによって提供されるコールバック。

まとめ

ネストされた型

onSessionEnded コールバックがトリガーされた理由を示します。

アドオン セッションの参加者から割り当てまたは取り消された権限を表します。

パブリック関数

Unit
onCollaborationStartingStateUpdate(
    collaborationStartingState: CollaborationStartingState!
)

アドオン セッションのコラボレーション開始状態の最新状態を受け取ります。

Unit

ユーザーによるアドオン セッションへの参加方法を定義する権限の最新の状態を受け取ります。

Unit

アドオン セッションの終了に応答します。

パブリック関数

onCollaborationStartingStateUpdate

fun onCollaborationStartingStateUpdate(
    collaborationStartingState: CollaborationStartingState!
): Unit

アドオン セッションのコラボレーション開始状態の最新状態を受け取ります。

アドオンがコラボレーションの開始状態をサポートするには、具体的な実装が必要です。

onParticipantPrivilegeChanged

fun onParticipantPrivilegeChanged(
    privileges: (Mutable)List<AddonSessionHandler.Privilege!>!,
    disabledPrivileges: (Mutable)List<AddonSessionHandler.Privilege!>!
): Unit

ユーザーによるアドオン セッションへの参加方法を定義する権限の最新の状態を受け取ります。

アドオンで主催者用ボタンをサポートするには、具体的な実装が必要です。

onSessionEnded

fun onSessionEnded(endReason: AddonSessionHandler.EndReason!): Unit

アドオン セッションの終了に応答します。

  1. このハンドラ インスタンスで新しい AddonSession が作成されない限り、このハンドラは追加の呼び出しを受け取りません。
  2. SDK は自動的にクリーンアップされます。endSession に対する追加の呼び出しは必要ありません。

実装例:

if (EndReason.SESSION_ENDED_UNEXPECTEDLY.equals(endReason)) {
  log("Something happened unexpectedly");
  // Display UI to user in case they want to reconnect.
  return;
}

if (EndReason.MEETING_ENDED_BY_USER.equals(endReason)) {
  // The meeting is disconnected because the user left the meeting. Perform some
  // cleanup, then exit.
  this.onMeetingDisconnected();
  return;
}

if (EndReason.SESSION_ENDED_BY_USER.equals(endReason)) {
  // Disconnected because the user left the session from the Meet application. However, the
  // conference is still active in Meet. Perform some cleanup, then listen for a possible
  // rejoin event.
  this.onSessionDisconnected();
  return;
}
パラメータ
endReason: AddonSessionHandler.EndReason!

セッションが終了した理由