{ "id": "163719", "key": "TIMOB-23981", "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": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2016-10-20T23:55:41.000+0000", "created": "2016-10-04T17:27:00.000+0000", "priority": { "name": "Medium", "id": "3" }, "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": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-10-20T23:55:41.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 Ti.Media.showCamera and setting saveToPhotoGallery to true an error will be thrown after the user has taken a photo. This is fixed by adding the following capabilities \r\n\r\n{code}\r\n\r\n\r\n{code}\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 console.log(JSON.stringify(error));\r\n },\r\n saveToPhotoGallery : true\r\n });\r\n}\r\nif (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# Add the code above to an existing app.js\r\n# Build for Windows {{appc run -p windows -T wp-device}}\r\n# Take a photo\r\n# Tap the tick to save the photo\r\n\r\nh5.Actual result\r\n\r\nError is thrown\r\n\r\nh5.Expected result\r\n\r\nError should not be thrown", "attachment": [], "flagged": false, "summary": "Windows: Using Ti.Media.showCamera with saveToPhotoGallery throws access denied", "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-56\r\nAppc NPM: 4.2.8-7\r\nTi SDK: 6.0.0.v20161004013027\r\nAppc Studio: 4.8.0.201609292239", "comment": { "comments": [ { "id": "399543", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I would resolve this as \"won't fix\", because it is difficult to detect if target property (saveToPhotoGallery) is actually true (or not) at compile time. We need to manually set required permission in this case.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-20T23:55:41.000+0000", "updated": "2016-10-20T23:55:41.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }