I downloaded the sound files from the server and saved them using
/data/data/packagename/sounds/filename.mp3
Then, if I play this sound with
.MediaPlayer mp= new MediaPlayer(); try { mp.setDataSource(PATH+"/"+fileName); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } mp.start();
But he shows an error
MediaPlayer:start called in state 2 MediaPlayer:Error(-38,0) MediaPlayer:Error(-38,0)
What is the problem with this, I have searched a lot in this regard, but no solutions offer any solutions.
source share