Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16993] BlackBerry: Camera API returning content length as 0

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-06-12T12:04:39.000+0000
Affected Version/sRelease 3.2.3
Fix Version/sRelease 3.3.0, Release 3.4.0
ComponentsBlackBerry
Labelsblackberry, camera, defect, qe-testadded
ReporterSapan Varshney
AssigneePedro Enrique
Created2014-05-20T06:56:16.000+0000
Updated2014-06-20T23:54:15.000+0000

Description

Camara API returning content length as 0 in success callback for blackberry platform and thus the captured image is not visible. Same code returns the actual content length of captured image for iOS/android platform. Steps to reproduce: 1. Copy paste the code in classic Project in app.js file and run the app. 2. Click on capture button. 3. Capture image using camera. Actual Result: alert showing the content length as 0 is visible and the captured image is not visible in the image container. Expected Result: alert showing the actual content length should be visible and the captured image should be visible in the image container. {Code} var win = Ti.UI.createWindow({BackgroundColor:'white',layout: 'vertical'}); var button = Ti.UI.createButton({title: 'take picture',top:20}); var imageView = Ti.UI.createImageView({ top:200, height:200, width:200 }); win.add(imageView); button.addEventListener('click', function() { Ti.Media.showCamera({ 'cancel': function() { Ti.API.info('cancel'); }, 'error': function() { Ti.API.info('error'); }, 'success': function(e) { alert('success: size=' + e.media.length); imageView.image = e.media; } }); }); win.add(button); setTimeout(function() { Ti.Media.hideCamera(); }, 3000); win.open(); {Code}

Attachments

FileDateSize
BB_Content_Length.png2014-05-20T06:56:16.000+000045620
BB_NoImage.png2014-05-20T06:56:16.000+000022868
IOS_Content_Length.png2014-05-20T06:56:16.000+0000445607
IOS_Image.png2014-05-20T06:56:16.000+0000429753

Comments

  1. Olga Romero 2014-06-20

    Add this code to tiapp.xml
       <blackberry>
           <permissions>
               <permission>access_shared</permission>
               <permission>use_camera</permission>
           </permissions>
       </blackberry> 
       
  2. Olga Romero 2014-06-20

    Tested and verified fixed as Camera API is returning the length size. Mac osx 10.9.3 Mavericks Appcelerator Studio, build: 3.3.0.201406171619 Titanium SDK, build: 3.3.0.v20140620104112 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-rc npm@1.3.2 titanium@3.3.0-rc titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1)

JSON Source