I have a very simple mediaplayer that play background. It calls file from the apk, but I want it to play from any directory like as music or sdcard.
Here are my codes:
private MediaPlayer mpintro;
.
.
mpintro = MediaPlayer.create(this, R.raw.intro);
mpintro.setLooping(true);
mpintro.start();
It works like this:
mpintro = MediaPlayer.create(this, Uri.parse(Environment.getExternalStorageDirectory().getPath()+ "/Music/intro.mp3"));
mpintro.setLooping(true);
mpintro.start();
It did not work properly as string filepath...