You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/21 13:44:00 UTC
[jira] [Commented] (CB-13307) Accessing Google Photos on Pixel from
cordova-plugin-camera
[ https://issues.apache.org/jira/browse/CB-13307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174770#comment-16174770 ]
ASF GitHub Bot commented on CB-13307:
-------------------------------------
GitHub user DavidBriglio opened a pull request:
https://github.com/apache/cordova-plugin-camera/pull/285
CB-13307: (Android) Fixed issue when unable to load image with mime t…
…ype "image/*", and failing to recognize new contentprovider uri authority.
### Platforms affected
Android
### What does this PR do?
Allows for image mimetype "image/*" to be accepted as a valid image.
Allows for google photos uri authority ".contentprovider" to be recognized.
### What testing has been done on this change?
When running "npm test" results in "invalid config loglevel='notice'".
When running "npm run test-build" results in "missing script: test-build".
Manual testing has been done on Android 8.0 Google Pixel with cordova cli 6.5.0.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DavidBriglio/cordova-plugin-camera CB-13307-MimeType-ContentProvider
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-camera/pull/285.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #285
----
commit 886ada803730c045e386ff3b643b0db8f4731277
Author: David Briglio <da...@versaterm.com>
Date: 2017-09-21T13:38:07Z
CB-13307: (Android) Fixed issue when unable to load image with mime type "image/*", and failing to recognize new contentprovider uri authority.
----
> Accessing Google Photos on Pixel from cordova-plugin-camera
> -----------------------------------------------------------
>
> Key: CB-13307
> URL: https://issues.apache.org/jira/browse/CB-13307
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-camera
> Reporter: David Briglio
>
> Currently when trying to access some photos from Google Photos, it fails to load. Android 8.0 on Google Pixel, cordova version 6.5.0, cordova-plugin-camera version 2.4.1.
> Causes:
> 1) Only mimetypes "image/jpeg" and "image/png" are accepted, all other types are considered an invalid image. The mimetype of the image I am loading gets set to "image/*".
> 2) In FileHelper.java: when hitting the isGooglePhotosUri method, the uri authority is compared against "com.google.android.apps.photos.content", where the actual is "com.google.android.apps.photos.contentprovider". This causes the logic to dismiss the image as not from Google Photos.
> After applying fixes for these two areas, I am able to successfully load all of my images.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org