Reputation: 21877
The following code to play the test_audio.mp3 using MediaPlayer
Object
works without calling the prepare()
method. What problems may arise if the prepare()
method is not called.
mp = MediaPlayer.create(this, R.raw.test_audio);
mp.start();
Upvotes: 0
Views: 397
Reputation: 1006799
The static create()
method on MediaPlayer
does a prepare()
for you, as is noted in the documentation for that method.
Upvotes: 4