{ "id": "163918", "key": "TIMOB-24026", "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-11-10T19:23:51.000+0000", "created": "2016-10-12T23:23:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T22:31:28.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": [], "description": "For the TIMOB-14533 app on MediaModule it is supposed to allow the user to Open Camera and then take a photograph. However, the only option is to capture a video and if you capture the video and select that the app shows an alert which states \"got the wrong type back=public video\".", "attachment": [ { "id": "60512", "filename": "code TIMOB-14533.docx", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-12T23:23:31.000+0000", "size": 100546, "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" } ], "flagged": false, "summary": "TIMOB-14533 app on Media Module displays video capture button when it should display image capture button", "creator": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "398816", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please provide a reproducible demo-code (best in a single app.js), thank you! Also, you are talking about Android, right?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-13T08:49:37.000+0000", "updated": "2016-10-13T08:50:43.000+0000" }, { "id": "399802", "author": { "name": "fmerzadyan-OLD", "key": "fmerzadyan", "displayName": "Farzad Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "User can use camera. Remove Ti.Media.MEDIA_TYPE_VIDEO from mediaTypes. To explicitly record video see *Android Capture Video Example* section at: http://docs.appcelerator.com/platform/latest/#!/guide/Camera_and_Photo_Gallery_APIs.\r\n\r\n{code:JavaScript}\r\nvar window = Ti.UI.createWindow({\r\n\ttitle: 'timob-14533',\r\n\tbackgroundColor: 'yellow'\r\n});\r\nvar imageView = Ti.UI.createImageView({\r\n\twidth: 400,\r\n\theight: 400\r\n});\r\nwindow.add(imageView);\r\nvar button = Ti.UI.createButton({\r\n\ttop: 10,\r\n\ttitle: 'Open Camera'\r\n});\r\nbutton.addEventListener(\"click\", function () {\r\n\tTitanium.Media.showCamera({\r\n\t\tsuccess: function (event) {\r\n\t\t\tTi.API.info('camera status: type was: ' + event.mediaType);\r\n\t\t\tif (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n\t\t\t\timageView.image = event.media.imageAsResized(400, 400);\r\n\t\t\t} else {\r\n\t\t\t\tTi.API.error(\"camera status: wrong type back: \" + event.mediaType);\r\n\t\t\t}\r\n\t\t},\r\n\t\tcancel: function () {\r\n\t\t\tTi.API.info(\"camera status: cancel\");\r\n\t\t},\r\n\t\terror: function (error) {\r\n\t\t\tTi.API.info(\"camera status: error: \" + error);\r\n\t\t},\r\n\t\tsaveToPhotoGallery: true,\r\n\t\tmediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t});\r\n});\r\nwindow.add(button);\r\nwindow.open(); \r\n{code}\r\n", "updateAuthor": { "name": "fmerzadyan-OLD", "key": "fmerzadyan", "displayName": "Farzad Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-25T17:49:30.000+0000", "updated": "2016-10-25T17:49:30.000+0000" }, { "id": "399808", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~fmerzadyan] The developer should be able to specify both photo and video media types unless Android disallows that. If that's the case, we need to update our docs regarding this behavior.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-25T18:36:38.000+0000", "updated": "2016-10-25T18:36:38.000+0000" }, { "id": "399870", "author": { "name": "fmerzadyan-OLD", "key": "fmerzadyan", "displayName": "Farzad Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "In the docs, it said that 'allowEditing and mediaTypes are iOS-only settings' (see http://docs.appcelerator.com/platform/latest/#!/guide/Camera_and_Photo_Gallery_APIs) and also in Android you have to declare a separate button for photo and video. So the same button is not allowed to be linked to different media types.", "updateAuthor": { "name": "fmerzadyan-OLD", "key": "fmerzadyan", "displayName": "Farzad Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-26T16:20:56.000+0000", "updated": "2016-10-26T16:20:56.000+0000" }, { "id": "415443", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as Won't Fix with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T22:31:28.000+0000", "updated": "2017-03-23T22:31:28.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }