[TIMOB-1652] Android: showCamera()'s success callback does not work for HTC phones
|Fix Version/s||Release 1.5.0|
|Labels||android, camera, defect|
The success callback is supposed to have the cropRect and media properties... The media property however is always returned as undefined, and the cropRect property only returns the default values. The image itself is successfully saved in the DCIM/Camera directory, but there is no way to access the image in that callback function.
Tested on HTC Droid Eris 2.1 and HTC Evo 2.2. I'm not sure if this is an issue for all Android phones or not.
- Brion Vibber 2011-04-15
I haven't encountered this with my Nexus 1; this is also an HTC phone but running a more stock 2.2 operating system. Could be some problem related to the Sense tweaks... perhaps the photo file's saving to a different place?
- Don Thorp 2011-04-15
HTC interpreted the Intent differently that Google.
- Ryan Coyner 2011-04-15
All photos are saved into "/sdcard/dcim/Camera", as defined by PHOTO_DCIM_CAMERA in MediaModule.java. When saveToPhotoGallery is enabled, it just dumps the image in that directory. When it is disabled (which it is by default), it creates a new set of directories in "/sdcard/dcim/Camera" which reflects the package name of your app (com/foo/bar).
The images being saved there isn't so much of an issue, although it would be nice to be able to properly define where it can be saved. The problem is that the success callback doesn't properly grab the information about the image. Accessing event.media returns undefined.
- Don Thorp 2011-04-15
(from [beec48069f8749b354a46ac66edf757a0bbd657e]) [#1652 state:fixed-in-qa] Added support for detecting the HTC camera app and working with it's different requirement for capturing images. If saveToPhotoGallery is true, the image is left where the camera puts it. If false, then the file is moved to the applications photo directory and the content provider updated with that information. This matches more closely with what we do when using the Google camera app. http://github.com/appcelerator/titanium_mobile/commit/beec48069f8749b354a46ac66edf757a0bbd657e"> http://github.com/appcelerator/titanium_mobile/commit/beec48069f874...
- Thomas Huelbert 2011-04-15
verified on an htc eris