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!

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