Created
May 20, 2014 09:03
-
-
Save ixiyang/c83db736433152dccabf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String getRealPathFromURI(Uri contentUri) { | |
String[] proj = { MediaStore.Audio.Media.DATA }; | |
Cursor cursor = managedQuery(contentUri, proj, null, null, null); | |
int column_index = cursor | |
.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA); | |
cursor.moveToFirst(); | |
return cursor.getString(column_index); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment