{ "id": "76476", "key": "TIMOB-4745", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-03-05T20:39:38.000+0000", "created": "2011-06-16T04:27:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "dr-list", "overlay", "showcamera" ], "versions": [], "issuelinks": [ { "id": "15539", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "82400", "key": "TIDOC-480", "fields": { "summary": "Android camera always opens in Landscape mode", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T20:35:03.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "I have an app which uses Ti.Media.showCamera with an overlay of buttons etc.\r\n\r\nThis works really well on iPhone where the camera view is displayed with the overlay and the buttons function. Also when the window is closed the close event is fired which runs the Ti.Media.hideCamera.\r\n\r\nOn Android, the camera view is shown with the overlay ... but the overlay is rotated 90% and none of the buttons work, also the close event on the window isn't fired when the window is closed.\r\n\r\nI am hoping I am doing something wrong but think this may be a bug.\r\n\r\nInfo...\r\n{code:lang=javascript}\r\n// All source code open Source Copyright 2011\r\n// Code submitted by thewarpedcoder .... trevor@thewarpedcoder.net\r\n\r\nTi.UI.setBackgroundColor('#ffffff');\r\n\r\nvar homeWindow =\tTitanium.UI.createWindow\r\n({\r\n\r\n});\r\nhomeWindow.open();\r\n\r\nvar displayVoucherOverlayView \t= \tTi.UI.createView\r\n({\r\n\ttop:\t\t0,\r\n\tbottom:\t\t0,\r\n\tleft:\t\t0,\r\n\tright:\t\t0,\r\n\topacity:\t0.75\r\n});\r\nvar setAButton\t=\tTi.UI.createButton\r\n({\r\n\ttop:\t\t100,\r\n\tleft:\t\t30,\r\n\tright:\t\t30,\r\n\theight:\t\t75,\r\n\ttitle:\t\t\"HELLO\"\r\n});\r\ndisplayVoucherOverlayView.add(setAButton);\r\n\r\nsetAButton.addEventListener('click', function() { alert(\"I HAVE BEEN PRESSED\");} );\r\n\r\nvar navigationBar = \tTi.UI.createView\r\n({\r\n\tbottom: \t\t\t0,\r\n\theight: \t\t\t50,\r\n\tright:\t\t\t\t0,\r\n\tbackgroundColor: \t\"#000000\",\r\n\topacity:\t\t\t0.75\r\n});\r\nvar navBarTestBtn \t= \tTi.UI.createView\r\n({\r\n\tleft:\t\t\t\t5,\r\n\twidth: \t\t\t\t90,\r\n\theight: \t\t\t50,\r\n\ttop: \t\t\t\t0,\r\n\tbackgroundColor: \t\"#000000\",\r\n\tborderColor: \t\t\"#FFFFFF\",\r\n\tborderWidth: \t\t2\r\n});\r\nvar navBarTestBtnText \t= \tTi.UI.createLabel\r\n({\r\n\twidth: \t\t\t\t90,\r\n\ttext: \t\t\t\t\"TEST\",\r\n\tcolor: \t\t\t\t\"#FFFFFF\",\r\n\ttextAlign: \t\t\t'center',\r\n\tfont: \t\t\t\t{fontSize: \t\t10}\r\n});\r\nnavBarTestBtn.add(navBarTestBtnText);\r\nnavigationBar.add(navBarTestBtn);\r\n\r\nnavBarTestBtn.addEventListener('click', function() {alert(\"IM A VIEW WITH A LISTENER\");} );\r\n\r\ndisplayVoucherOverlayView.add(navigationBar);\r\n\r\nvar cameraTransform \t= \tTi.UI.create2DMatrix();\r\ncameraTransform \t\t= \tcameraTransform.scale(2);\r\n\r\nTi.Media.showCamera\r\n({\r\n success:\t\t\tfunction(event) {},\r\n cancel:\t\t\t\tfunction() {},\r\n error:\t\t\t\tfunction(error) \r\n\t{\r\n if (error.code == Ti.Media.NO_CAMERA) \r\n\t\t{\r\n\t\t\talert(\"NO CAMERA\");\r\n } \r\n\t\telse \r\n\t\t{\r\n\t\t\talert(\"CAMERA ERROR\");\r\n }\r\n },\r\n\tmediaTypes:\t\t\t[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO],\r\n showControls:\t\tfalse,\r\n autohide:\t\t\tfalse,\r\n transform:\t\t\tcameraTransform,\r\n overlay:\t\t\tdisplayVoucherOverlayView\r\n});\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Camera - view not displaying overlay correctly", "creator": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "environment": "* all Android SDKs\r\n* Titanium Studio\r\n* Ti 1.7 (have also tried latest 1.8 drop) with Android Google API 2.3.3, but I have tried with various android versions all same result", "comment": { "comments": [ { "id": "157222", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "I'm sorry, Trevor, I cannot accept a 350-line usecase.\r\n\r\nIn order for us to progress this issue, please would you edit your ticket and replace your code with a [Use-case|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases]. To summarize, this is the simplest code that will demonstrate the issue, and will run without any modification.\r\n\r\nYou can read more about this in [Submitting Bug Reports|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-SubmittingBugReports].", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-06-20T15:49:38.000+0000", "updated": "2011-06-20T15:49:38.000+0000" }, { "id": "157268", "author": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "body": "Hi Paul\r\n\r\nI have created a smaller user case, however it shows some of the problems specifically the overlay orientation.\r\n\r\nI have again created a gist and pastebin paste. Code length ... 128 lines.\r\n\r\nhttps://gist.github.com/1037834\r\nhttp://pastebin.com/HkWQhycG\r\n\r\nIt does not however show the buttons not working on the overlay as the original does.\r\n\r\nThe original code is also set to show the close event. The latest code is not, however the close event does not fire.\r\n\r\nThe latest user case works on Android and iPhone devices. Does not run in emulator as it requires camera.\r\n\r\nThe code shows how the application which actually has the issue with is coded uses NameSpaces and calls which is why it is structured in this way.\r\n\r\nHope this is all OK, please let me know if you require anything else.\r\n\r\nT...\r\n", "updateAuthor": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "created": "2011-06-21T06:28:38.000+0000", "updated": "2011-06-21T06:28:38.000+0000" }, { "id": "159058", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "There is a HD ticket relying on this, \r\nhttp://appc.me/c/APP-148816", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-07-08T12:50:41.000+0000", "updated": "2011-07-08T12:50:41.000+0000" }, { "id": "159106", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Trevor\r\n\r\nA usecase is not intended to be an example of best coding practice; ideally it's a sequential list of Ti API calls, without any namespaces or functions. The KitchenSink will give you a good idea of what I mean by this. Furthermore, it must run without modification, which yours does not.\r\n\r\nIf there is more than one issue involved, then please submit a separate ticket for each of them.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T04:16:53.000+0000", "updated": "2011-07-09T04:16:53.000+0000" }, { "id": "159778", "author": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "body": "Hi Paul\r\n\r\nSorry this has taken so long, but had limited computer access for the past week or so.\r\n\r\nOK I think I understand my mistake, I had basically cut and pasted the code from the main application which does use Name Spaces etc.\r\n\r\nHere is a new Use Case.\r\n\r\ngit://gist.github.com/1089764.git\r\n\r\nI have run it on a Nexus 1 using Ti SDK 1.7.1 and 1.8. I only have the app.js with the pasted code in. Hope this is as required. There are a few other issues with the camera with buttons on the overlay not working and event handlers not working, but I am thinking that as this is only on Android, it may all be related to the overlay being displayed at a 90% rotation. as the components in my full overlay are overwriting each other, and the buttons in the Use Case work.\r\n\r\nPlease let me now if you need anything else", "updateAuthor": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-18T08:07:31.000+0000", "updated": "2011-07-18T08:07:31.000+0000" }, { "id": "160320", "author": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "body": "Hi Paul\r\n\r\nNo worries it has been removed.\r\n\r\nT...", "updateAuthor": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-22T08:19:11.000+0000", "updated": "2011-07-22T08:19:11.000+0000" }, { "id": "414891", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate of the ticket that is mentioned above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T20:35:03.000+0000", "updated": "2017-03-22T20:35:03.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }