{ "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.
-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
-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
\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
\nScreenShot and Video attached
\nTiSDK 1.6.1, iPad 2, iOS 4.3
\n(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...