I've commited new changes that should fix the whole problem. When you edit the image it get changed and then you get it from a file path instead of a content path.
2016-02-21 23:22 GMT+01:00 julio cesar sanchez <[email protected]>: > The PR doesn't fix CB-10625 > With the fix, if I choose photos app it doesn't takes me to the "edit" > screen and it works. If I choose gallery app it takes me to the "edit" > screen and it fails. I can choose 2 apps to edit, photos and crop app, none > of them work. > > 2016-02-21 21:09 GMT+01:00 julio cesar sanchez <[email protected]>: > >> Joe, I've found the real problem, forget what I said about the >> isGooglePhotosUri, it wasn't even entering in the if, it was crashing on >> DocumentsContract.getDocumentId(uri); with "IllegalArgumentException: >> Invalid URI" >> >> I've added a try catch and in case it crashes it will use the original >> uri to query the content resolver. >> >> Take a look to the PR and let me know what do you think. >> >> https://github.com/apache/cordova-plugin-camera/pull/175 >> >> 2016-02-21 0:20 GMT+01:00 julio cesar sanchez <[email protected]>: >> >>> Bad news, I tried at home and didn't work on android 4.4 or android 5, >>> it's not entering on the isGooglePhotosUri and always goes to the error >>> callback. Trying to force the uri.getLastPathSegment() doesn't return a >>> good url neither. >>> I'm not sure why it worked when I tested on android M, will check again >>> on monday. >>> >>> >>> >>> >>> 2016-02-19 8:22 GMT+01:00 julio cesar sanchez <[email protected]>: >>> >>>> Sure, I can send it this weekend. >>>> >>>> 2016-02-18 18:49 GMT+01:00 Joe Bowser <[email protected]>: >>>> >>>>> Cool, want to send a PR so we can get this resolved? I tried string >>>>> manipulation, but for some reason it didn't work. >>>>> >>>>> On Thu, Feb 18, 2016 at 1:22 AM, julio cesar sanchez < >>>>> [email protected] >>>>> > wrote: >>>>> >>>>> > I already answered on CB-10625 >>>>> > >>>>> > When android 4.4 broke input type file support I wrote a plugin at >>>>> work to >>>>> > use a file picker instead. >>>>> > >>>>> > For google Photos I use this code: >>>>> > >>>>> > if (isGooglePhotosUri(uri)) >>>>> > return uri.getLastPathSegment(); >>>>> > >>>>> > Where isGooglePhotosUri is >>>>> > >>>>> > public static boolean isGooglePhotosUri(Uri uri) { >>>>> > return >>>>> > "com.google.android.apps.photos.content".equals(uri.getAuthority()); >>>>> > } >>>>> > >>>>> > I tried it on the camera plugin and worked. >>>>> > >>>>> > >>>>> > The plugin is based on this android library >>>>> > https://github.com/iPaulPro/aFileChooser >>>>> > >>>>> > The relevant class is >>>>> > >>>>> > >>>>> https://github.com/iPaulPro/aFileChooser/blob/master/aFileChooser/src/com/ipaulpro/afilechooser/utils/FileUtils.java >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > 2016-02-17 1:41 GMT+01:00 Joe Bowser <[email protected]>: >>>>> > >>>>> > > Hey >>>>> > > >>>>> > > https://issues.apache.org/jira/browse/CB-10625 >>>>> > > >>>>> > > For some reason Google Photos breaks the Camera's Gallery API, and >>>>> I'm >>>>> > > having trouble trying to fix this one. For some reason I can't >>>>> get the >>>>> > > FileHelper to work with the new file URI that's being provided by >>>>> an >>>>> > > application. Is there something obvious that we're missing here? >>>>> > > >>>>> > > Any thoughts? >>>>> > > >>>>> > >>>>> >>>> >>>> >>> >> >
