Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13307

Accessing Google Photos on Pixel from cordova-plugin-camera

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • cordova-plugin-camera
    • None

    Description

      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.
      Merge request here.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dbriglio David Briglio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: