[TIMOB-19910] Android: openPhotoGallery fails when remote image selected
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-14T20:52:58.000+0000 |
Affected Version/s | Release 5.0.2 |
Fix Version/s | Release 5.4.0 |
Components | Android |
Labels | Community |
Reporter | Manuel Lehner |
Assignee | Ashraf Abu |
Created | 2015-10-02T14:33:35.000+0000 |
Updated | 2016-12-20T03:40:53.000+0000 |
Hello [~manuellehner], I have tested this issue with SDK 5.0.0.GA, 5.0.1.GA. The issue is seems to be resolved. Environment TI SDK 5.0.0.GA, 5.0.1.GA CLI 5.0.2 Android 5.0.2, Galaxy A5. Below is the output log when a particular image is opened and selected from "gallery".
And, Here is the output log when that particular image is opened and selected from "google photos".
Both are performed simultaneously one after another. No Java exception occurred. Thanks.
Thanks.
[~ahossain] Thanks for testing. I've just tested this again with your example code with 4.1.0.GA and 5.0.0.GA - but I was able to reproduce this error (testing on a Nexus 5). I've selected two images from Google Photos, first one stored on the device, works fine:
The second image is not on the device, it loads the file from the cloud and then shows this log:
Although it shows the image in the preview, I'm not able to upload the Blob to my server which works fine for locally stored images.
Hello [~manuellehner], I have observed the similar issue with SDK 5.0.2.GA. In Android 4.4.2 Device, when a photo is selected from Google Photos and if the photo is not existing in device the image first downloads and loads into the image view. In addition to that the following error occur.
Thanks.
[~manuellehner] Which Android version were you using? Was it Android 6.0?
Yes, Android 6.0, but I remember having the same problem with Android 5.x
Hi, I'm having the same problem. I found out that this is a problem with native code as well. See this: http://stackoverflow.com/questions/24573640/android-error-upload-image-in-different-android-versions I've confirmed that this is an issue with the photos app, when selecting media that is available on the cloud. Is it possible to work around the issue using the DocumentsProvider API as stated in the answer from the link?
[~filaruina] I see. Thank you for that link. Are you using that natively (DocumentsProvider)?
No, I just limited this functionality on my app, which is terrible, but while appcelerator doesn't give us a solution, I'll have to live with that.
PR https://github.com/appcelerator/titanium_mobile/pull/7911
PR merged.
Thanks! Will wait for the update and try it.
Verified the fix.
openPhotoGallery
does not fail when remote image is selected. Closing. Environment: Appc Studio : 4.7.0.201606150733 Ti SDK : 5.4.0.v20160617074028 Ti CLI : 5.0.9 Alloy : 1.9.0 MAC El Capitan : 10.11.4 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-18 Node: 4.4.4 Nexus 6 - Android 6.0.1Is anyone else getting this error when using openPhotoGallery with SDK 6.0.0? I started getting it all of a sudden and gallery image selection became completely broken.
Hello, Even i got this error yesterday working on SDK 6.0.0. If I assign the "e.media" to my imageView.image property is does display the image but as soon as I try and explore the "e.media", either to extract e.media.nativePath or even JSON.Stringify(e.media), it gives me this error. Any guidance , highly appreciated. Cheers
Thanks David, :) I will follow the progress there.. Cheers