Android.Media Namespace

The Media APIs are used to play and, in some cases, record media files.

Classes

AsyncPlayer

Plays a series of audio URIs, but does all the hard work on another thread so that any slowness with preparing or loading doesn't block the calling thread.

AudioAttributes

A class to encapsulate a collection of attributes describing information about an audio stream.

AudioAttributes.Builder
AudioAttributes.InterfaceConsts
AudioDeviceCallback
AudioDeviceInfo
AudioFocusRequestClass
AudioFocusRequestClass.Builder
AudioFormat

The AudioFormat class is used to access a number of audio format and channel configuration constants.

AudioFormat.Builder
AudioFormat.InterfaceConsts
AudioManager

AudioManager provides access to volume and ringer mode control.

AudioManager.AudioFocusChangeEventArgs
AudioManager.AudioPlaybackCallback
AudioManager.AudioRecordingCallback
AudioPlaybackConfiguration
AudioPlaybackConfiguration.InterfaceConsts
AudioRecord

The AudioRecord class manages the audio resources for Java applications to record audio from the audio input hardware of the platform.

AudioRecord.Builder
AudioRecord.MarkerReachedEventArgs

Provides data for the MarkerReached event.

AudioRecord.PeriodicNotificationEventArgs

Provides data for the PeriodicNotification event.

AudioRecord.RoutingChangedEventArgs
AudioRecordingConfiguration
AudioRecordingConfiguration.InterfaceConsts
AudioTimestamp

Structure that groups a position in frame units relative to an assumed audio stream, together with the estimated time when that frame was presented or is committed to be presented.

AudioTrack

The AudioTrack class manages and plays a single audio resource for Java applications.

AudioTrack.Builder
AudioTrack.MarkerReachedEventArgs

Provides data for the MarkerReached event.

AudioTrack.PeriodicNotificationEventArgs

Provides data for the PeriodicNotification event.

AudioTrack.RoutingChangedEventArgs
CamcorderProfile

Retrieves the predefined camcorder profile settings for camcorder applications.

CameraProfile

The CameraProfile class is used to retrieve the pre-defined still image capture (jpeg) quality levels (0-100) used for low, medium, and high quality settings in the Camera application.

DeniedByServerException

Exception thrown when the provisioning server or key server denies a certficate or license for a device.

DrmInitData
DrmInitData.SchemeInitData
ExifInterface

This is a class for reading and writing Exif tags in a JPEG file.

FaceDetector

Identifies the faces of people in a Bitmap graphic object.

FaceDetector.Face

A Face contains all the information identifying the location of a face in a bitmap.

Image
Image.Plane
ImageReader
ImageReader.ImageAvailableEventArgs
ImageWriter
ImageWriter.ImageReleasedEventArgs
JetPlayer

JetPlayer provides access to JET content playback and control.

JetPlayer.JetEventEventArgs

Provides data for the JetEvent event.

JetPlayer.JetNumQueuedSegmentUpdateEventArgs

Provides data for the JetNumQueuedSegmentUpdate event.

JetPlayer.JetPauseUpdateEventArgs

Provides data for the JetPauseUpdate event.

JetPlayer.JetUserIdUpdateEventArgs

Provides data for the JetUserIdUpdate event.

MediaActionSound
MediaCas
MediaCas.MediaCasEventArgs
MediaCas.PluginDescriptor
MediaCas.Session
MediaCasException
MediaCasException.DeniedByServerException
MediaCasException.NotProvisionedException
MediaCasException.ResourceBusyException
MediaCasException.UnsupportedCasException
MediaCasStateException
MediaCodec

MediaCodec class can be used to access low-level media codecs, i.e. encoder/decoder components.

MediaCodec.BufferInfo

Per buffer metadata includes an offset and size specifying the range of valid data in the associated codec buffer.

MediaCodec.Callback
MediaCodec.CodecException
MediaCodec.CryptoException
MediaCodec.CryptoInfo

Metadata describing the structure of a (at least partially) encrypted input sample.

MediaCodec.CryptoInfo.Pattern
MediaCodec.FrameRenderedEventArgs
MediaCodec.MetricsConstants
MediaCodecInfo

Provides information about a given media codec available on the device.

MediaCodecInfo.AudioCapabilities
MediaCodecInfo.CodecCapabilities

Encapsulates the capabilities of a given codec component, i.e. what profile/level combinations it supports and what colorspaces it is capable of providing the decoded data in.

MediaCodecInfo.CodecProfileLevel
MediaCodecInfo.EncoderCapabilities
MediaCodecInfo.VideoCapabilities
MediaCodecList

Allows you to enumerate available codecs, each specified as a MediaCodecInfo object, find a codec supporting a given format and query the capabilities of a given codec.

MediaCrypto

MediaCrypto class can be used in conjunction with MediaCodec to decode encrypted media data.

MediaCryptoException

Exception thrown if MediaCrypto object could not be instantiated or if unable to perform an operation on the MediaCrypto object.

MediaDataSource
MediaDescrambler
MediaDescription

A simple set of metadata for a media item suitable for display.

MediaDescription.Builder
MediaDescription.InterfaceConsts
MediaDrm

MediaDrm can be used to obtain keys for decrypting protected media streams, in conjunction with MediaCrypto.

MediaDrm.CryptoSession
MediaDrm.ExpirationUpdateEventArgs
MediaDrm.KeyRequest

Contains the opaque data an app uses to request keys from a license server

MediaDrm.KeyStatus
MediaDrm.KeyStatusChangeEventArgs
MediaDrm.MediaDrmEventArgs

Provides data for the MediaDrmEvent event.

MediaDrm.MediaDrmStateException
MediaDrm.ProvisionRequest

Contains the opaque data an app uses to request a certificate from a provisioning server

MediaDrmException

Base class for MediaDrm exceptions

MediaDrmResetException
MediaExtractor

MediaExtractor facilitates extraction of demuxed, typically encoded, media data from a data source.

MediaExtractor.CasInfo
MediaExtractor.MetricsConstants
MediaFormat

Encapsulates the information describing the format of media data, be it audio or video.

MediaMetadata

Contains metadata about an item, such as the title, artist, etc.

MediaMetadata.Builder
MediaMetadata.InterfaceConsts
MediaMetadataEditor

An abstract class for editing and storing metadata that can be published by RemoteControlClient.

MediaMetadataRetriever

MediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file.

MediaMuxer

MediaMuxer facilitates muxing elementary streams.

MediaMuxer.OutputFormat

Defines the output format.

MediaPlayer

MediaPlayer class can be used to control playback of audio/video files and streams.

MediaPlayer.BufferingUpdateEventArgs

Provides data for the BufferingUpdate event.

MediaPlayer.DrmInfo
MediaPlayer.DrmInfoEventArgs
MediaPlayer.DrmPreparedEventArgs
MediaPlayer.ErrorEventArgs

Provides data for the Error event.

MediaPlayer.InfoEventArgs

Provides data for the Info event.

MediaPlayer.MetricsConstants
MediaPlayer.NoDrmSchemeException
MediaPlayer.ProvisioningNetworkErrorException
MediaPlayer.ProvisioningServerErrorException
MediaPlayer.TimedMetaDataAvailableEventArgs
MediaPlayer.TimedTextEventArgs

Provides data for the TimedText event.

MediaPlayer.TrackInfo

Class for MediaPlayer to return each audio/video/subtitle track's metadata.

MediaPlayer.TrackInfo.InterfaceConsts
MediaPlayer.VideoSizeChangedEventArgs

Provides data for the VideoSizeChanged event.

MediaRecorder

Used to record audio and video.

MediaRecorder.AudioEncoder

Defines the audio encoding.

MediaRecorder.AudioSource

Defines the audio source.

MediaRecorder.ErrorEventArgs

Provides data for the Error event.

MediaRecorder.InfoEventArgs

Provides data for the Info event.

MediaRecorder.MetricsConstants
MediaRecorder.OutputFormat

Defines the output format.

MediaRecorder.VideoEncoder

Defines the video encoding.

MediaRecorder.VideoSource

Defines the video source.

MediaRouter

MediaRouter allows applications to control the routing of media channels and streams from the current device to external speakers and destination devices.

MediaRouter.Callback

Interface for receiving events about media routing changes.

MediaRouter.RouteCategory

Definition of a category of routes.

MediaRouter.RouteGroup

Information about a route that consists of multiple other routes in a group.

MediaRouter.RouteInfo

Information about a media route.

MediaRouter.SimpleCallback

T:Android.Media.MediaRouter+Callback

MediaRouter.UserRouteInfo

Information about a route that the application may define and modify.

MediaRouter.VolumeCallback

Interface for receiving events about volume changes.

MediaScannerConnection

MediaScannerConnection provides a way for applications to pass a newly created or downloaded media file to the media scanner service.

MediaScannerConnection.ScanCompletedEventArgs
MediaSync
MediaSync.Callback
MediaSync.ErrorEventArgs
MediaSyncEvent

The MediaSyncEvent class defines events that can be used to synchronize playback or capture actions between different players and recorders.

MediaTimestamp
NotProvisionedException

Exception thrown when an operation on a MediaDrm object is attempted and the device does not have a certificate.

PlaybackParams
PlaybackParams.InterfaceConsts
Rating

A class to encapsulate rating information used as content metadata.

Rating.InterfaceConsts
RemoteControlClient

RemoteControlClient enables exposing information meant to be consumed by remote controls capable of displaying metadata, artwork and media transport control buttons.

RemoteControlClient.MetadataEditor

Class used to modify metadata in a RemoteControlClient object.

RemoteControlClient.MetadataUpdateEventArgs

Provides data for the MetadataUpdate event.

RemoteControlClient.PlaybackPositionUpdateEventArgs

Provides data for the PlaybackPositionUpdate event.

RemoteController

The RemoteController class is used to control media playback, display and update media metadata and playback status, published by applications using the RemoteControlClient class.

RemoteController.ClientChangeEventArgs
RemoteController.ClientMetadataUpdateEventArgs
RemoteController.ClientPlaybackStateUpdateEventArgs
RemoteController.ClientPlaybackStateUpdateSimpleEventArgs
RemoteController.ClientTransportControlUpdateEventArgs
RemoteController.MetadataEditor
ResourceBusyException

Exception thrown when an operation on a MediaDrm object is attempted and hardware resources are not available, due to being in use.

Ringtone

Ringtone provides a quick method for playing a ringtone, notification, or other similar types of sounds.

RingtoneManager

RingtoneManager provides access to ringtones, notification, and other types of sounds.

SoundPool

The SoundPool class manages and plays audio resources for applications.

SoundPool.Builder
SoundPool.LoadCompleteEventArgs

Provides data for the LoadComplete event.

SyncParams
ThumbnailUtils

Thumbnail generation routines for media provider.

TimedMetaData
TimedText
ToneGenerator

This class provides methods to play DTMF tones (ITU-T Recommendation Q.23), call supervisory tones (3GPP TS 22.

UnsupportedSchemeException

Exception thrown when an attempt is made to construct a MediaDrm object using a crypto scheme UUID that is not supported by the device

VolumeProvider

Handles requests to adjust or set the volume on a session.

VolumeShaper
VolumeShaper.Configuration
VolumeShaper.Configuration.Builder
VolumeShaper.Configuration.InterfaceConsts
VolumeShaper.Operation
VolumeShaper.Operation.InterfaceConsts

Interfaces

AudioManager.IOnAudioFocusChangeListener

Interface definition for a callback to be invoked when the audio focus of the system is updated.

AudioRecord.IOnRecordPositionUpdateListener

Interface definition for a callback to be invoked when an AudioRecord has reached a notification marker set by SetNotificationMarkerPosition(Int32) or for periodic updates on the progress of the record head, as set by SetPositionNotificationPeriod(Int32).

AudioRecord.IOnRoutingChangedListener
AudioTrack.IOnPlaybackPositionUpdateListener

Interface definition for a callback to be invoked when the playback head position of an AudioTrack has reached a notification marker or has increased by a certain period.

AudioTrack.IOnRoutingChangedListener
ImageReader.IOnImageAvailableListener
ImageWriter.IOnImageReleasedListener
IVolumeAutomation
JetPlayer.IOnJetEventListener

Handles the notification when the JET engine generates an event.

MediaCas.IEventListener
MediaCodec.IOnFrameRenderedListener
MediaDrm.IOnEventListener

Interface definition for a callback to be invoked when a drm event occurs

MediaDrm.IOnExpirationUpdateListener
MediaDrm.IOnKeyStatusChangeListener
MediaPlayer.IOnBufferingUpdateListener

Interface definition of a callback to be invoked indicating buffering status of a media resource being streamed over the network.

MediaPlayer.IOnCompletionListener

Interface definition for a callback to be invoked when playback of a media source has completed.

MediaPlayer.IOnDrmConfigHelper
MediaPlayer.IOnDrmInfoListener
MediaPlayer.IOnDrmPreparedListener
MediaPlayer.IOnErrorListener

Interface definition of a callback to be invoked when there has been an error during an asynchronous operation (other errors will throw exceptions at method call time).

MediaPlayer.IOnInfoListener

Interface definition of a callback to be invoked to communicate some info and/or warning about the media or its playback.

MediaPlayer.IOnPreparedListener

Interface definition for a callback to be invoked when the media source is ready for playback.

MediaPlayer.IOnSeekCompleteListener

Interface definition of a callback to be invoked indicating the completion of a seek operation.

MediaPlayer.IOnTimedMetaDataAvailableListener
MediaPlayer.IOnTimedTextListener

Interface definition of a callback to be invoked when a timed text is available for display.

MediaPlayer.IOnVideoSizeChangedListener

Interface definition of a callback to be invoked when the video size is first known or updated

MediaRecorder.IOnErrorListener

Interface definition for a callback to be invoked when an error occurs while recording.

MediaRecorder.IOnInfoListener

Interface definition for a callback to be invoked when an error occurs while recording.

MediaScannerConnection.IMediaScannerConnectionClient

An interface for notifying clients of MediaScannerConnection when a connection to the MediaScanner service has been established and when the scanning of a file has completed.

MediaScannerConnection.IOnScanCompletedListener

Interface for notifying clients of the result of scanning a requested media file.

MediaSync.IOnErrorListener
RemoteControlClient.IOnGetPlaybackPositionListener

Interface definition for a callback to be invoked when the media playback position is queried.

RemoteControlClient.IOnMetadataUpdateListener
RemoteControlClient.IOnPlaybackPositionUpdateListener

Interface definition for a callback to be invoked when the media playback position is requested to be updated.

RemoteController.IOnClientUpdateListener
SoundPool.IOnLoadCompleteListener

Interface definition for a callback to be invoked when all the sounds are loaded.

Enums

Adjust

Enumerates values returned by the Lower, Raise, and Same members and taken as a parameter of several types.

AudioAdjustMode
AudioContentType

F:Android.Media.AudioAttributes+Builder.SetContentType

AudioDeviceType
AudioEncoder

F:Android.Media.MediaRecorder.SetAudioEncoder

AudioFallbackMode
AudioFlags
AudioFocus
AudioFocusRequest

Enumerates values returned by several types.

AudioRecordReadOptions
AudioSource

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.AudioRecord..ctor, and F:Android.Media.MediaRecorder.SetAudioSource members.

AudioSyncSource
AudioTimebase
AudioTrackMode

Enumerates values returned by the Static, and Stream members and taken as a parameter of several methods of AudioTrack.

AudioTrackPerformanceMode
AudioTrackState

Enumerates values returned by several types.

AudioUsageKind

Enumerates values returned by several methods of AudioUsageKind.

BitmapKey
BitrateMode

Enumerates values returned by the Cbr, Cq, and Vbr members and taken as a parameter of the F:Android.Media.MediaCodecInfo+EncoderCapabilities.IsBitrateModeSupported member.

CamcorderQuality

Enumerates values returned by several types and taken as a parameter of several methods of CamcorderProfile.

CameraQuality
ChannelConfiguration

Enumerates values returned by several methods of ChannelConfiguration and taken as a parameter of the F:Android.Media.AudioTrack..ctor, and F:Android.Media.AudioTrack..ctor members.

ChannelIn

Enumerates values returned by several types and taken as a parameter of several types.

ChannelOut

Enumerates values returned by several types and taken as a parameter of several types.

ColorRange
ColorStandard
ColorTransfer
Encoding

Enumerates values returned by several types and taken as a parameter of several types.

Euler

Enumerates values returned by the X, Y, and Z members and taken as a parameter of the F:Android.Media.FaceDetector+Face.Pose member.

GetDevicesTargets
MediaActionSoundType
MediaCodecBufferFlags
MediaCodecCapabilities

Enumerates values returned by several types.

MediaCodecConfigFlags

Enumerates values returned by the ConfigureFlagEncode, Encode, and None members and taken as a parameter of the F:Android.Media.MediaCodec.Configure member.

MediaCodecCryptoErrorType

F:Android.Media.MediaCodec+CryptoException..ctor

MediaCodecCryptoMode

F:Android.Media.MediaCodec+CryptoInfo.Set

MediaCodecErrorCode
MediaCodecInfoState

Enumerates values returned by several types.

MediaCodecListKind

Enumerates values returned by the AllCodecs, and RegularCodecs members and taken as a parameter of the F:Android.Media.MediaCodecList..ctor member.

MediaCodecProfileLevel

F:Android.Media.MediaCodecInfo+CodecCapabilities.CreateFromProfileLevel

MediaCodecProfileType

Enumerates values returned by several types.

MediaDrmEventType

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaDrm+IOnEventListener.OnEvent, and F:Android.Media.MediaDrm+MediaDrmEventArgs..ctor members.

MediaDrmKeyType

Enumerates values returned by several types.

MediaDrmStatusCode
MediaError

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaPlayer+ErrorEventArgs..ctor, and F:Android.Media.MediaPlayer+IOnErrorListener.OnError members.

MediaExtractorSampleFlags

Enumerates values returned by several types.

MediaExtractorSeekTo

F:Android.Media.MediaExtractor.SeekTo

MediaInfo

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaPlayer+IOnInfoListener.OnInfo, and F:Android.Media.MediaPlayer+InfoEventArgs..ctor members.

MediaMetadataEditKey

Enumerates values returned by several types and taken as a parameter of several types.

MediaPlaybackType

F:Android.Media.MediaRouter+UserRouteInfo.SetPlaybackType

MediaPlayerSeekMode
MediaPlayerVideoScalingModeNotInUse

Enumerates values returned by several types.

MediaRecorderError

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaRecorder+ErrorEventArgs..ctor, and F:Android.Media.MediaRecorder+IOnErrorListener.OnError members.

MediaRecorderInfo

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaRecorder+IOnInfoListener.OnInfo, and F:Android.Media.MediaRecorder+InfoEventArgs..ctor members.

MediaRouterCallbackFlags

F:Android.Media.MediaRouter.AddCallback

MediaRouterDeviceType
MediaRouteType

Enumerates values returned by several types and taken as a parameter of several types.

MediaSyncErrorCode
MediaSyncEventType

F:Android.Media.MediaSyncEvent.CreateEvent

MediaTrackType

F:Android.Media.MediaPlayer.GetSelectedTrack

MetadataKey
Mode

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.AudioManager.GetRouting, and F:Android.Media.AudioManager.SetRouting members.

MuxerOutputType

F:Android.Media.MediaMuxer..ctor

Option

F:Android.Media.MediaMetadataRetriever.GetFrameAtTime

Orientation

Enumerates values returned by several methods of Orientation and taken as a parameter of the F:Android.Hardware.Camera2.DngCreator.SetOrientation member.

OutputFormat

F:Android.Media.MediaRecorder.SetOutputFormat

PlayState

Enumerates values returned by several types.

PrepareDrmStatus
RatingStyle

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.Rating.NewStarRating, and F:Android.Media.Rating.NewUnratedRating members.

RecordState

Enumerates values returned by the RecordingState, Recording, and Stopped members.

RecordStatus

Enumerates values returned by several types.

RemoteControlFlags
RemoteControlPlayState

Enumerates values returned by several types and taken as a parameter of several types.

RingerMode

Enumerates values returned by several types.

RingtoneColumnIndex

Enumerates values returned by the Id, Title, and Uri members.

RingtoneType

Enumerates values returned by several types and taken as a parameter of several methods of RingtoneManager.

Route

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.AudioManager.SetRouting, and F:Android.Media.AudioManager.SetRouting members.

ScoAudioState

Enumerates values returned by several types.

SoundEffect

Enumerates values returned by several methods of SoundEffect and taken as a parameter of the F:Android.Media.AudioManager.PlaySoundEffect, and F:Android.Media.AudioManager.PlaySoundEffect members.

State

Enumerates values returned by the State, Initialized, and Uninitialized members.

Stream

Enumerates values returned by several types and taken as a parameter of several types.

SynchronizationPosition

F:Android.Media.RemoteController.SetSynchronizationMode

ThumnailExtractOptions

Enumerates values returned by the OptionsRecycleInput, None, and RecycleInput members and taken as a parameter of the F:Android.Media.ThumbnailUtils.ExtractThumbnail, and F:Android.Media.ThumbnailUtils.ExtractThumbnailAsync members.

Tone

Enumerates values returned by several methods of Tone and taken as a parameter of the F:Android.Media.ToneGenerator.StartTone, and F:Android.Media.ToneGenerator.StartTone members.

TrackStatus

Enumerates values returned by several types.

VibrateSetting

F:Android.Media.AudioManager.SetVibrateSetting

VibrateType
VideoEncoder

F:Android.Media.MediaRecorder.SetVideoEncoder

VideoScalingMode

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaCodec.SetVideoScalingMode, and F:Android.Media.MediaPlayer.SetVideoScalingMode members.

VideoSource

Enumerates values returned by the Camera, Default, and Surface members and taken as a parameter of the F:Android.Media.MediaRecorder.SetVideoSource member.

Volume

Enumerates values returned by several types and taken as a parameter of several types.

VolumeControl

Enumerates values returned by the Absolute, Fixed, and Relative members.

VolumeHandling

F:Android.Media.MediaRouter+UserRouteInfo.SetVolumeHandling

VolumeInterpolatorType
VolumeNotificationFlags

Enumerates values returned by several methods of VolumeNotificationFlags and taken as a parameter of several methods of AudioManager.

WhiteBalance

Enumerates values returned by the Auto, and Manual members.

WriteMode

Enumerates values returned by the Blocking, and NonBlocking members and taken as a parameter of several methods of AudioTrack.

Delegates

RemoteControlClient.GetPlaybackPositionHandler