[TIMOB-16993] BlackBerry: Camera API returning content length as 0
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-12T12:04:39.000+0000 |
Affected Version/s | Release 3.2.3 |
Fix Version/s | Release 3.3.0, Release 3.4.0 |
Components | BlackBerry |
Labels | blackberry, camera, defect, qe-testadded |
Reporter | Sapan Varshney |
Assignee | Pedro Enrique |
Created | 2014-05-20T06:56:16.000+0000 |
Updated | 2014-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
Add this code to tiapp.xml
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)