{ "id": "161852", "key": "TIMOB-23656", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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-08-01T04:26:16.000+0000", "created": "2016-07-19T18:31:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "qe-5.4.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52227", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "161851", "key": "TIMOB-23655", "fields": { "summary": "Windows: Implement Ti.Geolocation.requestLocationPermissions/hasLocationPermissions methods to match iOS and Android behaviour", "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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "52228", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "151042", "key": "TIMOB-19479", "fields": { "summary": "Parity for Android and iOS on handling of permissions", "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": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-10-05T10:53:35.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\nAs part of TIMOB-19479 the media permissions was rewritten to be consistent across iOS and Android and use Ti.Media.requestCameraPermissions/hasCameraPermissions. Windows should move to match iOS and Android. A code sample can be found below\r\n\r\n{code}\r\nfunction showCamera() {\r\n Titanium.Media.showCamera({\r\n success : function(event) {\r\n // called when media returned from the camera\r\n Ti.API.debug('Photo taken successfully');\r\n },\r\n cancel : function() {\r\n // called when user cancels taking a picture\r\n Ti.API.debug('Photo cancelled.');\r\n },\r\n error : function(error) {\r\n Ti.API.debug('Photo errored.');\r\n // called when there's an error\r\n var a = Titanium.UI.createAlertDialog({\r\n title : \"Camera\"\r\n });\r\n a.setMessage(JSON.stringify(error));\r\n a.show();\r\n },\r\n saveToPhotoGallery : true\r\n });\r\n }\r\n if (Ti.Media.hasCameraPermissions()) {\r\n showCamera();\r\n } else {\r\n Ti.Media.requestCameraPermissions(function(e) {\r\n if (e.success === true) {\r\n showCamera();\r\n } else {\r\n alert(\"Access denied, error: \" + e.error);\r\n }\r\n });\r\n }\r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n# Run the code above on Windows Platform {{appc run -p windows }}\r\n\r\nh5.Actual result\r\n\r\nThe app will throw an error as the methods are not implemented\r\n\r\n\r\nh5.Expected result\r\n\r\nYou should be prompted to allow camera access\r\n\r\n", "attachment": [], "flagged": false, "summary": "Windows: Implement Ti.Media.requestCameraPermissions/hasCameraPermissionsmethods to match iOS and Android behaviour", "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": "Windows 10 Pro\r\nAppc CLI Core: 5.4.0-33\r\nAppc CLI NPM: 4.2.7\r\nTi SDK: 5.3.0.GA, \r\nAppc Studio: 4.7.0.201607130543", "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "391559", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/790", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-26T21:13:04.000+0000", "updated": "2016-07-26T21:13:04.000+0000" }, { "id": "391604", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~eharris] In the ticket description, {{Actual}} and {{Expect}} results are inverted, right?\r\n\r\nh5.Actual result\r\n\r\nThe app will throw an error as the methods are not implemented\r\n\r\nh5.Expected result\r\n\r\nYou should be prompted to allow camera access", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-27T02:21:25.000+0000", "updated": "2016-07-27T02:21:25.000+0000" }, { "id": "391647", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~kota] yup, sorry about that! Updated", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-07-27T09:58:34.000+0000", "updated": "2016-07-27T09:58:34.000+0000" }, { "id": "392080", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Note for QE:\r\n\r\n- Calling {{requestCameraPermissions()}} callbacks {{success=true}} when there's {{webcam}} capability configured in {tiapp.xml}}. It should be configured in tiapp.xml because there's no way to request camera permission at runtime on Windows.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-01T04:15:41.000+0000", "updated": "2016-08-01T04:15:51.000+0000" }, { "id": "398111", "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-56\r\nAppc NPM: 4.2.8-7\r\nTi SDK: 6.0.0.v20161004202820\r\nAppc Studio: 4.8.0.201609292239\r\n\r\nCode in description now works as expected\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-10-05T10:53:19.000+0000", "updated": "2016-10-05T10:53:19.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }