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

CoDoingSession

Stay organized with collections Save and categorize content based on your preferences.
public interface CoDoingSession

Represents a co-doing session.

Constant Summary

int MAX_CODOING_BLOB_BYTES Maximum allowed blob size in bytes.
int PREFERRED_MAX_CODOING_BLOB_BYTES Preferred maximum allowed blob size (1kb) in bytes.

Public Method Summary

abstract void
broadcastStateUpdate(CoDoingState updatedCoDoingState)
Broadcasts state to all other current participants, and becomes the default state for any participants until some other state is broadcast.

Constants

public static final int MAX_CODOING_BLOB_BYTES

Maximum allowed blob size in bytes.

Constant Value: 1650

public static final int PREFERRED_MAX_CODOING_BLOB_BYTES

Preferred maximum allowed blob size (1kb) in bytes.

Constant Value: 1024

Public Methods

public abstract void broadcastStateUpdate (CoDoingState updatedCoDoingState)

Broadcasts state to all other current participants, and becomes the default state for any participants until some other state is broadcast.

Note: This shared state is eventually consistent across participants. For predictable behavior, this binary state should be complete state, not partial, as the Live Sharing SDK does not provide guarantees around the delivery of individual messages -- only eventual consistency.

Note: In a race condition where two participants call this method simultaneously, the Live Sharing SDK will select a canonical winning update. The losing update may or may not be applied to participants, but the winning update will always be applied later.

Parameters
updatedCoDoingState the updated activity state that will be broadcast to other participants. Preferred blob size is PREFERRED_MAX_CODOING_BLOB_BYTES.
Throws
NullPointerException if updatedCoDoingState is null.
LiveSharingException if there was an unexpected error.
IllegalStateException if called after the co-doing session has ended.
IllegalStateException if blob size > MAX_CODOING_BLOB_BYTES.