Getting audio file path or URI from mediastore
I am making an application which lists all the songs on the device onto the screen and clicking on them opens a sharing intent where the songs / audio file can be shared across various devices through different method like Bluetooth, WhatsApp etc. But I am not able to get the file path or location of the audio file from the mediastore. This is how I am getting my songs- public void getSongList() { //retrieve song info ContentResolver musicResolver = getActivity().getContentResolver(); Uri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; Cursor musicCursor =