Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10348] Android: Error Saving Picture on Android 4

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionNeeds more info
Resolution Date2012-08-08T22:15:22.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterCindy Kao
AssigneeNeeraj Gupta
Created2012-08-08T11:50:11.000+0000
Updated2017-03-16T20:43:36.000+0000

Description

Unable to take picture and save in Android 4 devices.

Steps to reproduce:

1. Take a picture 2. Click the Save button inside the camera app
 success : function( event ) {

           var image;

       var resizedOptions = {
           width : 640,
           height : 480,
           format : ImageFactory.PNG
       };

       try {
           var newFile = Ti.Filesystem.createTempFile(Ti.Filesystem.applicationDataDirectory, 'temp.jpg');
           newFile.write(image);
           image = ImageFactory.imageAsResized(newFile.read(), resizedOptions);
       } catch( e ) {
           Ti.API.info("App.UI.Ticket.Actions.CameraField image saving failed " + e + " " + e.error);
           image = false;
       }

       

           if (image && image.mimeType &&  (image.mimeType === "image/png" || image.mimeType === "image/jpeg")) {


               //SUCCESS
       
           } else {
               //FAILURE                
           }

       }

Comments

  1. Neeraj Gupta 2012-08-08

    This appears to be a code snippet and not the complete test case. Please provide a complete test case and make sure that Support team can reproduce it in house before moving it to TIMOB queue.
  2. Lee Morris 2017-03-16

    Closing ticket as the information that was requested was never provided.

JSON Source