Multimedia
- Playing Audio
- Watching Video
- Recording Audio
- Using camera
Multimedia classes
- AudioManager
- Play sound effects
- Manage volume, system sound effects and ringer mode control
- Manage peripherals
- SoundPool
- Represents a collection of audio samples (streams)
- Can mix and play multiple simultaneously
- RingtoneManager & Ringtone
- MediaPlayer
- MediaRecorder
- Camera
- Control the camera
AudioManager
- Get instance
- Context.getSystemService(Context.AUDIO_SERVICE)
SoundPool
- Is an asynchronous operation that load a file using the method onLoadComplete that is implemented by setOnLoadCompleteListener
- When the status is equal to 0 the file is uploaded
SoundPool soundPool.setOnLoadCompleteListener(new OnLoadCompleteListener() {
@Override
public void onLoadComplete(SoundPool soundPool, int sampleId,
int status) {
if (0 == status) {
playButton.setEnabled(true);
}
}
});
RingtoneManager
Have access to the default ringtones
Uri uri = RingtoneManager
.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
MediaPlayer
Controls Playback of audio and video stream and files
VideoView
Is a subclass of SurfaceView for displaying video
Comentarios
Publicar un comentario