{ "id": "63994", "key": "TIMOB-3362", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11247", "name": "Sprint 2011-12", "archived": true, "released": true, "releaseDate": "2011-03-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-11T14:46:40.000+0000", "created": "2011-04-15T03:43:15.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "ipad2", "klist", "release-1.7.0", "reported-1.6.1", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-11T14:46:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

If you run an iPad application on the iPad\nTitanium.Media.showCamera doesn't work.
\nIf you run an iPhone application on the iPad,\nTitanium.Media.showCamera camera works properly.

\n

-fail with iPad app Step 1: make an app for 'iPad' and paste in\nthe code below.
\nstep 2: run the app on an iPad 2
\nStep 3: click the 'camera' button
\nStep 4: notice the camera overlay fly out the top of the page

\n

-pass with iPhone app Step 1: make an application for 'iPhone'\nand paste in the code below
\nstep 2: run the app on an iPad 2
\nStep 3: click the 'camera' button
\nStep 4: notice the camera works properly

\n
\nTitanium.UI.setBackgroundColor('#000');\n\nvar win1 = Titanium.UI.createWindow({  \n    title:'Tab 1',\n    backgroundColor:'#fff'\n});\n\nvar camera_button = Titanium.UI.createButton ({\n    title:'Camera',\n    height:60,\n    bottom: 10,\n    width:160\n});\ncamera_button.addEventListener ('click', function(e) {  \n    \n    Titanium.Media.showCamera ({\n        \n        saveToPhotoGallery: true,\n        allowEditing: true,\n        // top:100,\n        // width:'auto',\n        \n        success: function(event){\n            var a = Titanium.UI.createAlertDialog({\n                title: 'You did it!'\n            });\n            a.show();\n        },\n        \n        error: function(error){\n            var a = Titanium.UI.createAlertDialog({\n                title: 'Uh Oh...'\n            });\n            if (error.code == Titanium.Media.NO_CAMERA || error.code == Titanium.Media.NO_VIDEO) {\n                a.setMessage('Sorry, this device does not have a camera. You knew that, right?');\n            }\n            else {\n                a.setMessage('Unexpected error: ' + error.code);\n            }\n            a.show();\n        }\n                \n    });\n\n});\n\nwin1.add(camera_button);\nwin1.open();\n
\n

Resources

\n

ScreenShot and Video attached

\n

Tested With

\n

TiSDK 1.6.1, iPad 2, iOS 4.3

\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/76504

{html}", "attachment": [ { "id": "18308", "filename": "bad_ipad_camera.png", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:16.000+0000", "size": 49809, "mimeType": "image/png" }, { "id": "18307", "filename": "ipad_camera_problem.mov", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:16.000+0000", "size": 344362, "mimeType": "video/quicktime" } ], "flagged": false, "summary": "iOS: showCamera does not work on iPad2 if running iPad app", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130613", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [47df9dd21bf4febfde5e2a17c946bb9c7a590d62])\n[#3362 status:fixed-in-qa] Implement\ndisplayCamera:, fix up closeModalPicker: and properly track\nlifetime of popover so that showCamera will work on iPad2 and no\nlonger be in a popover \nhttps://github.com/appcelerator/titanium_mobile/commit/47df9dd21bf4...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:17.000+0000", "updated": "2011-04-15T03:43:17.000+0000" }, { "id": "133436", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.7.0.879871b...(05/10/11 19:34) on iPad 2 (4.3.3)", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-11T14:46:40.000+0000", "updated": "2011-05-11T14:46:40.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }