From 989376dfbfd9cd98f241840fc5252376b759e9b9 Mon Sep 17 00:00:00 2001 From: Niko Ruotsalainen Date: Wed, 17 Apr 2019 16:39:19 +0300 Subject: [PATCH] Get native path from google photos cloud images --- src/android/FilePath.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/android/FilePath.java b/src/android/FilePath.java index 67ae4fe..231a838 100644 --- a/src/android/FilePath.java +++ b/src/android/FilePath.java @@ -387,12 +387,15 @@ else if ("content".equalsIgnoreCase(uri.getScheme())) { // Return the remote address if (isGooglePhotosUri(uri)) { - String contentPath = getContentFromSegments(uri.getPathSegments()); - if (contentPath != "") { - return getPath(context, Uri.parse(contentPath)); - } - else { - return null; + if (uri.toString().contains("mediakey")) { + return getDriveFilePath(uri, context); + } else { + String contentPath = getContentFromSegments(uri.getPathSegments()); + if (contentPath != "") { + return getPath(context, Uri.parse(contentPath)); + } else { + return null; + } } }