管理即時會議

啟動並登入後,建議使用即時分享應用程式呼叫 AddonClient.registerMeetingStatusListener(),監聽進行中的會議。

傳遞至 MeetingStatusListener.onMeetingStatusChange()MeetingStatus 值會告知即時分享應用程式如何進行即時分享。

下列程式碼範例顯示會議的潛在 MeetingStatus

Java

public abstract class MeetingStatus {
  …

  /**
   * Describes the status of the user in Meet.
   *
   * <p>Note: This status is only relevant to the Meet application and meetings. It doesn't mention anything about
   * whether the Live Sharing SDK is connected to the Meet app or is participating in a
   * live sharing session. Hence, it's possible for a status of {@code ADDON_SESSION} but the local
   * user isn't participating.
   */
  public enum Status {
    ADDON_SESSION,
    MEETING,
    NO_MEETING
  }

  …
}

您應個別處理下列各種情況:

  • ADDON_SESSION:使用者正在參與也會舉行即時分享工作階段的會議。必須立即連線至即時分享工作階段。詳情請參閱使用 Co-Watching API使用 Co-Doing API
  • MEETING:使用者正在參與會議,但會議並未舉辦即時分享工作階段。使用者可能開始即時分享,因此需要啟動即時分享工作階段。
  • NO_MEETING:使用者並未參與會議,因此除非使用者明確表示想啟動新的工作階段,否則不必啟動即時分享工作階段。