[TIMOB-13159] Android: Images are blank/ have an empty entry when saved to the photo gallery
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-18T20:35:19.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2013 Sprint 08 API, 2013 Sprint 08, Release 3.1.1, Release 3.2.0 |
Components | Android |
Labels | module_imageview, qe-closed-3.1.0, qe-testadded, regression |
Reporter | Allen Yeung |
Assignee | Ping Wang |
Created | 2013-03-22T06:05:34.000+0000 |
Updated | 2013-10-03T10:29:23.000+0000 |
Description
Run the test case mentioned at https://gist.github.com/4527649
After taking the picture, and saving it, hit 'back' to close the app.
Then navigate to the gallery app, and you will find the image you just took to be blank (it should be under ).
NOTE if you push the 'home' button instead of 'back' it will save correctly.
This is a regression and was working in 2.1.X
This regression is caused by [PR#2475](https://github.com/appcelerator/titanium_mobile/pull/2475).
This is a behavior change due to PR#2475. Before that commit, we did not delete the temporary image file so it always had a copy of the image in the gallery no matter saveToPhotoGallery was set to true or false. After that commit, we delete all the temporary files when the app exits so the image saved in the gallery is removed if saveToPhotoGallery is false. But since the gallery can not refresh automatically, we can still see a blank image in the gallery. [PR#4148](https://github.com/appcelerator/titanium_mobile/pull/4148) should resolve the blank image issue.
PR: https://github.com/appcelerator/titanium_mobile/pull/4148 For FR: 1. Please run the test case below. 2. Take a picture and click the "Save" button. 3. Click 'back' to close the app. 4. Check the photo gallery. The image you just took should *NOT* be there. 5. Change the test case line 48 to "saveToPhotoGallery: true". Then repeat 2-3. 6. Check the photo gallery. The image you just took should be there. Test case:
3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4196
Verified fixed with: Mac OS 10.8.3 Safari: 6.0.4 Xcode 4.6 CLI: 3.1.0 titanium-code-processor: 1.0.1 Alloy: 1.1.2 Titanium SDK version 3.1.1.v20130508001914 Nexus 4 4.2.1 Images with saveToPhotoGallery: true are appearing in the gallery.