{ "id": "163020", "key": "TIMOB-23869", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-14T00:41:50.000+0000", "created": "2016-09-06T11:17:25.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-6.0.0" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [ { "id": "52633", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "159342", "key": "TIMOB-23156", "fields": { "summary": "Windows: Automatically add required Capabilities to Manifest based on API usage", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-16T14:12:21.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nWhen using the code below and not adding the videosLibrary capability, when the picture is taken the app will crash. If the videosLibrary capability is added then it will work as expected. From testing it appears that the generation of used capabilities by the CLI does not add the videosLibrary capability.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'green', layout: 'vertical' }),\r\n openButton = Ti.UI.createButton({ title: 'OPEN CAMERA', backgroundColor: 'blue' }),\r\n imageView = Ti.UI.createImageView({ width: Ti.UI.FILL, height: '70%' });\r\n \r\nvar overlay = Ti.UI.createView({\r\n layout: 'vertical',\r\n height: '20%', width: Ti.UI.FILL,\r\n bottom: 0\r\n}),\r\ntakeButton = Ti.UI.createButton({ title: 'TAKE A PHOTO', backgroundColor: 'red' }),\r\nhideButton = Ti.UI.createButton({ title: 'HIDE PREVIEW', backgroundColor: 'red' });\r\n \r\ntakeButton.addEventListener('click', function () {\r\n Ti.Media.takePicture();\r\n});\r\nhideButton.addEventListener('click', function () {\r\n Ti.Media.hideCamera();\r\n});\r\noverlay.add(takeButton);\r\noverlay.add(hideButton);\r\n \r\nopenButton.addEventListener('click', function () {\r\n Ti.Media.showCamera({\r\n whichCamera: Titanium.Media.CAMERA_FRONT, // Titanium.Media.CAMERA_REAR\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n overlay: overlay,\r\n success: function (e) {\r\n Ti.API.info('showCamera() success');\r\n },\r\n error: function (e) {\r\n alert('showCamera() error: ' + JSON.stringify(e));\r\n }\r\n });\r\n});\r\n \r\nwin.add(openButton);\r\nwin.add(imageView);\r\nwin.open();\r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n# Add the code above to an existing app.js\r\n# Build for a device\r\n# Click OPEN CAMERA\r\n# Click TAKE PHOTO\r\n\r\nh5.Actual result\r\n\r\nThe app will crash as the videosLibrary is not included\r\n\r\nh5.Expected result\r\n\r\nApp should not crash, correct capabilities should be added", "attachment": [], "flagged": false, "summary": "Windows: Ti.Media.takePicture usage does not include videosLibrary capability", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "OS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-38\r\nAppc NPM: 4.2.8-6\r\nTi SDK: 6.0.0.v20160904203840", "closedSprints": [ { "id": 707, "state": "closed", "name": "2016 Sprint 19 SDK", "startDate": "2016-09-10T00:17:15.164Z", "endDate": "2016-09-24T00:17:00.000Z", "completeDate": "2016-09-26T05:17:04.253Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "395388", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/853\r\n6_0_X: https://github.com/appcelerator/titanium_mobile_windows/pull/854", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-06T12:49:29.000+0000", "updated": "2016-09-06T12:49:29.000+0000" }, { "id": "395680", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Reopening ticket:\r\n\r\nOS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-38\r\nAppc NPM: 4.2.8-6\r\nTi SDK: 6.0.0.v20160909001132\r\n\r\nCode in description crashes still. Seems like is also required", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-09-09T15:26:41.000+0000", "updated": "2016-09-09T15:26:41.000+0000" }, { "id": "395868", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/866\r\n6_0_X: https://github.com/appcelerator/titanium_mobile_windows/pull/867", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-12T08:11:34.000+0000", "updated": "2016-09-12T08:14:38.000+0000" }, { "id": "396338", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nOS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-42\r\nAppc NPM: 4.2.8-6\r\nTi SDK: 6.0.0.v20160915125929\r\nAppc Studio: 4.8.0.201609101003\r\nLumia 930 10.0\r\n\r\nUsing the code in the description the app no longer crashes.\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-09-16T14:11:59.000+0000", "updated": "2016-09-16T14:11:59.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }