Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1652] Android: showCamera()'s success callback does not work for HTC phones

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:46.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, camera, defect
ReporterRyan Coyner
AssigneeDon Thorp
Created2011-04-15T02:58:28.000+0000
Updated2011-04-17T01:56:46.000+0000

Description

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.

Comments

  1. 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?

  2. Don Thorp 2011-04-15

    HTC interpreted the Intent differently that Google.

  3. 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.

  4. 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...

  5. Thomas Huelbert 2011-04-15

    verified on an htc eris

JSON Source