Playing Audio Files From SD Card
I wanted to load files from the SD card into a SoundPool as well as ringtones. I am able to successfully get the path of the files, and I am able to play them with MediaPlayer. How
Solution 1:
You can use android.os.Environment.getExternalStorageDirectory()
to get the directory to your sdcard and append the file and extension, you can then use SoundPool withload(String path, int priority)
, to access your file.
Or while not recommended you can even hardcode your path to "/sdcard/".
If the problem is not with getting the soundfile path then you can take a look at Creating Sound Effects in Android
Post a Comment for "Playing Audio Files From SD Card"