AddonSessionHandler

@PublicApi
public interface AddonSessionHandler



โค้ดเรียกกลับที่ได้รับจากแอปส่วนเสริมสำหรับเซสชัน

สรุป

ประเภทที่ซ้อนกัน

อธิบายเหตุผลที่เรียกให้แสดงโค้ดเรียกกลับ onSessionEnded

อธิบายสิทธิ์ที่มีการจัดสรรหรือเพิกถอนจากผู้เข้าร่วมในเซสชันส่วนเสริม

วิธีการสาธารณะ

default void

ได้รับสถานะล่าสุดของการทำงานร่วมกันในเซสชันส่วนเสริม

default void

ได้รับสถานะล่าสุดของสิทธิ์ที่กำหนดวิธีที่ผู้ใช้อนุญาตให้เข้าร่วมในเซสชันส่วนเสริม

abstract void

ตอบกลับเมื่อสิ้นสุดเซสชันส่วนเสริม

วิธีการสาธารณะ

onCollaborationStartingStateUpdate

default void onCollaborationStartingStateUpdate(
    CollaborationStartingState collaborationStartingState
)

ได้รับสถานะล่าสุดของการทำงานร่วมกันในเซสชันส่วนเสริม

ส่วนเสริมจะต้องมีการติดตั้งใช้งานอย่างเป็นรูปธรรมเพื่อสนับสนุนสถานะเริ่มต้นของการทำงานร่วมกัน

onParticipantPrivilegeChanged

default void onParticipantPrivilegeChanged(
    List<AddonSessionHandler.Privilege> privileges,
    List<AddonSessionHandler.Privilege> disabledPrivileges
)

ได้รับสถานะล่าสุดของสิทธิ์ที่กำหนดวิธีที่ผู้ใช้อนุญาตให้เข้าร่วมในเซสชันส่วนเสริม

ส่วนเสริมจะต้องมีการติดตั้งใช้งานอย่างเป็นรูปธรรมเพื่อรองรับการควบคุมของผู้จัดการประชุม

onSessionEnded

abstract void onSessionEnded(AddonSessionHandler.EndReason endReason)

ตอบกลับเมื่อสิ้นสุดเซสชันส่วนเสริม

  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;
}
พารามิเตอร์
AddonSessionHandler.EndReason endReason

เหตุผลที่เซสชันสิ้นสุดลง