Browse SDKs · Android
SDKsAndroid

Create an audio message from a local path

Create an audio message from an absolute path.

Copy
Message message = OpenIMClient.getInstance().messageManager
    .createSoundMessageFromFullPath(absolutePath, durationSeconds);

The absolute path must be readable, and the audio duration is measured in seconds. This method only creates an object waiting to be sent.