prepareSoundAnnotationForSharing

suspend fun prepareSoundAnnotationForSharing(context: Context, soundAnnotation: SoundAnnotation): Uri

Extracts audio data embedded in a SoundAnnotation to a directory backed by DocumentSharingProvider. Audio data is written as a WAV file.

Return

Uri that can be used for sharing the sound annotation to other apps.

Parameters

soundAnnotation

Sound annotation that should be shared.

Throws

if the audio data could not be exported.


suspend fun prepareSoundAnnotationForSharing(context: Context, soundAnnotation: SoundAnnotation, fileName: String?): Uri

Extracts audio data embedded in a SoundAnnotation to a directory backed by DocumentSharingProvider. Audio data is written as a WAV file.

Return

Uri that can be used for sharing the sound annotation to other apps.

Parameters

soundAnnotation

Sound annotation that should be shared.

fileName

Optional file name used for sharing the wave file (this is the shared file name as seen by other apps).

Throws

if the audio data could not be exported.