Problem: How do we get/access file from SD-card?
Solution:
File externalStorage = Environment.getExternalStorageDirectory(); String strUri = externalStorage.getAbsolutePath()+"/"+"test.mp3"; System.out.println("============> Hello => "+strUri);
Output:Output of Environment.getExternalStorageDirectory() can be either /sdcard or /mnt/sdcard. As i have tested it, it returns the below output on different brand device:
In Samsung Galaxy 3 => /mnt/sdcard/test.mp3
In HTC Hero => /sdcard/test.mp3