Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Audiomanager and MediaPlayer

Tags:

android

Can anybody explain me what's the difference between AudioManager and MediaPlayer in Android ? If I am correct, then AudioManager can only play audio, while MediaPlayer can play both audio and video. But I believe there must be more to this.

Thanks.

like image 596
Rajat Avatar asked Mar 10 '13 19:03

Rajat


1 Answers

AudioManager doesn't play sound at all. It provides access to sound settings, but to play sounds easily, you should use MediaPlayer, SoundPool, or possibly AudioTrack.

From the docs:

AudioManager provides access to volume and ringer mode control.

like image 199
Geobits Avatar answered Sep 30 '22 16:09

Geobits