After launch and sign-in, we recommend the live sharing app calls LiveSharingClient.registerMeetingStatusListener()
to listen for the existence of an ongoing meeting.
The MeetingStatus
value passed to the MeetingStatusListener.onMeetingStatusChange()
informs the live sharing app about how to engage live sharing:
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 {
NO_MEETING,
MEETING,
ADDON_SESSION
}
…
}
Each of these cases should be dealt with differently:
NO_MEETING
: The user is not participating in a meeting, so initiating a live sharing session is not needed until the user explicitly indicates they want to start a new session.MEETING
: The user is participating in a meeting, but the meeting is not hosting a live sharing session. Beginning the live sharing session is needed as the user seems likely to begin live sharing.ADDON_SESSION
: The user is participating in a meeting that's also hosting a live sharing session. Connecting to the live sharing session immediately is needed. For more information, see Use the Co-Watching API or Use the Co-Doing API.