Most visited

Recently visited

Added in API level 1

android.media

Provides classes that manage various media interfaces in audio and video.

The Media APIs are used to play and, in some cases, record media files. This includes audio (e.g., play MP3s or other music files, ringtones, game sound effects, or DTMF tones) and video (e.g., play a video streamed over the web or from local storage).

Other special classes in the package offer the ability to detect the faces of people in Bitmaps (FaceDetector), control audio routing (to the device or a headset) and control alerts such as ringtones and phone vibrations (AudioManager).

Interfaces

AudioManager.OnAudioFocusChangeListener Interface definition for a callback to be invoked when the audio focus of the system is updated. 
AudioRecord.OnRecordPositionUpdateListener Interface definition for a callback to be invoked when an AudioRecord has reached a notification marker set by setNotificationMarkerPosition(int) or for periodic updates on the progress of the record head, as set by setPositionNotificationPeriod(int)
AudioRecord.OnRoutingChangedListener This interface was deprecated in API level 24. users should switch to the general purpose AudioRouting.OnRoutingChangedListener class instead.  
AudioRouting AudioRouting defines an interface for controlling routing and routing notifications in AudioTrack and AudioRecord objects. 
AudioRouting.OnRoutingChangedListener Defines the interface by which applications can receive notifications of routing changes for the associated AudioRouting
AudioTrack.OnPlaybackPositionUpdateListener 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.OnRoutingChangedListener This interface was deprecated in API level 24. users should switch to the general purpose AudioRouting.OnRoutingChangedListener class instead.  
ImageReader.OnImageAvailableListener Callback interface for being notified that a new image is available. 
ImageWriter.OnImageReleasedListener ImageWriter callback interface, used to to asynchronously notify the application of various ImageWriter events. 
JetPlayer.OnJetEventListener Handles the notification when the JET engine generates an event. 
MediaCodec.OnFrameRenderedListener Listener to be called when an output frame has rendered on the output surface 
MediaDrm.OnEventListener Interface definition for a callback to be invoked when a drm event occurs  
MediaDrm.OnExpirationUpdateListener Interface definition for a callback to be invoked when a drm session expiration update occurs  
MediaDrm.OnKeyStatusChangeListener Interface definition for a callback to be invoked when the keys in a drm session change states. 
MediaPlayer.OnBufferingUpdateListener Interface definition of a callback to be invoked indicating buffering status of a media resource being streamed over the network. 
MediaPlayer.OnCompletionListener Interface definition for a callback to be invoked when playback of a media source has completed. 
MediaPlayer.OnErrorListener 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.OnInfoListener Interface definition of a callback to be invoked to communicate some info and/or warning about the media or its playback. 
MediaPlayer.OnPreparedListener Interface definition for a callback to be invoked when the media source is ready for playback. 
MediaPlayer.OnSeekCompleteListener Interface definition of a callback to be invoked indicating the completion of a seek operation. 
MediaPlayer.OnTimedMetaDataAvailableListener Interface definition of a callback to be invoked when a track has timed metadata available. 
MediaPlayer.OnTimedTextListener Interface definition of a callback to be invoked when a timed text is available for display. 
MediaPlayer.OnVideoSizeChangedListener Interface definition of a callback to be invoked when the video size is first known or updated  
MediaRecorder.OnErrorListener Interface definition for a callback to be invoked when an error occurs while recording. 
MediaRecorder.OnInfoListener Interface definition for a callback to be invoked when an error occurs while recording. 
MediaScannerConnection.MediaScannerConnectionClient An interface for notifying clients of MediaScannerConnection when a connection to the MediaScanner