Media player not playing mp3 files in android 2.3

148 Views Asked by At

I want to play audio in my application.I am using android studio . I created a raw directory in res folder and place mp3 files there.Audio working perfectly on higher apis like I am testing on Lollipop emulator its works fine and not working on api 2.3+. Here is my code

 MediaPlayer mediaPlayer;
 mediaPlayer=MediaPlayer.create(this,R.raw.bismillah);
 mediaPlayer.start();

Whats wrong in this code .Need help ?

0

There are 0 best solutions below