Browse SDKs · Android
SDKsAndroid

Create a video message

Create a video message from paths relative to the SDK data directory.

Copy
Message message = OpenIMClient.getInstance().messageManager.createVideoMessage(
    videoPath,
    mimeType,
    durationSeconds,
    snapshotPath
);

The video and snapshot files must be stored under the data directory configured during SDK initialization. Pass both paths relative to that directory, and specify the duration in seconds. This method only creates an object waiting to be sent.