Skip to content

Instantly share code, notes, and snippets.

View maninp's full-sized avatar

Manikandan M maninp

View GitHub Profile
@SeongUgJung
SeongUgJung / GoogleImageFilePath.java
Created September 25, 2015 07:29
Android Google Photos's Uri
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)) {