The Google Meet Live Sharing SDK is in preview. Developers can apply for access through our Early Access Program.

MeetingDisconnectHandler

public interface MeetingDisconnectHandler

Callback provided by the Live Sharing App to handle the end of the connected meeting.

Nested Class Summary

enum MeetingDisconnectHandler.EndReason Describes the reason the Meeting ended callback was triggered. 

Public Method Summary

abstract void
onMeetingEnded(MeetingDisconnectHandler.EndReason endReason)
Responds to the end of the Meeting associated with the Live Sharing session.

Public Methods

public abstract void onMeetingEnded (MeetingDisconnectHandler.EndReason endReason)

Responds to the end of the Meeting associated with the Live Sharing session.

  1. This handler will receive no additional calls, unless LiveSharingClient.connectMeeting(Context, String, MeetingDisconnectHandler) is called again and passed this same handler instance.
  2. The SDK will clean itself up. No additional calls to LiveSharingClient.disconnectMeeting(), LiveSharingClient.endCoDoing(), or LiveSharingClient.endCoWatching() are necessary.

Implementation example:

if (endReason == EndReason.SESSION_ENDED_UNEXPECTEDLY) {
   log("Meeting crashed");
   // display UI to user in case they want to reconnect.
   return;
 } else if (endReason == EndReason.SESSION_ENDED_BY_USER) {
   // The meeting is disconnected because the user hung up. Perform some
   // cleanup, then exit.
   this.onMeetingDisconnected();
   return;
 }
 
Parameters
endReason the reason the Meeting ended.