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 getImagePath(Context context, Uri uri){ | |
if ("content".equalsIgnoreCase(uri.getScheme())) { | |
if (isGoogleOldPhotosUri(uri)) { | |
// return http path, then download file. | |
return uri.getLastPathSegment(); | |
} else if (isGoogleNewPhotosUri(uri)) { | |
// copy from uri. context.getContentResolver().openInputStream(uri); | |
return copyFile(context, uri); | |
} else if (isPicasaPhotoUri(uri)) { |