Android.Media.MediaRecorder.SetMaxFileSize Method
Sets the maximum filesize (in bytes) of the recording session.

Syntax

[Android.Runtime.Register("setMaxFileSize", "(J)V", "GetSetMaxFileSize_JHandler")]
public virtual void SetMaxFileSize (long max_filesize_bytes)

Parameters

max_filesize_bytes
the maximum filesize in bytes (if zero or negative, disables the limit)

Exceptions

TypeReason
Java.Lang.IllegalArgumentException

Remarks

Sets the maximum filesize (in bytes) of the recording session. Call this after setOutFormat() but before prepare(). After recording reaches the specified filesize, a notification will be sent to the NoType:android/media/MediaRecorder$OnInfoListener;Href=../../../reference/android/media/MediaRecorder.OnInfoListener.html with a "what" code of MediaRecorder.MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED and recording will be stopped. Stopping happens asynchronously, there is no guarantee that the recorder will have stopped by the time the listener is notified.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3