Created
February 28, 2014 12:49
-
-
Save BlaShadow/9270495 to your computer and use it in GitHub Desktop.
Get Path from uri Java
This file contains 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
public String getPath(Uri uriFile){ | |
String[] proj = { MediaStore.Images.Media.DATA }; | |
CursorLoader loader = new CursorLoader(this, uriFile, proj, null, null, null); | |
Cursor cursor = loader.loadInBackground(); | |
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.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