{ "id": "123895", "key": "TIMOB-16080", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-07T19:46:35.000+0000", "created": "2013-12-17T20:52:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-07T22:06:04.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": "Please update \"registerForTouch\" in TiUIView.java with\r\n\r\n{code}\r\nif (clickable) {\r\n registerTouchEvents(touchable);\r\n doSetClickable(touchable);\r\n} else {\r\n touchable.setSoundEffectsEnabled(false);\r\n}\r\n{code}\r\n\r\nReasoning: If a developer has specifically set a view to be non-touchable, then there should not be a touch sound on that view.\r\n\r\nAlternative would be to add another view property for soundEffectsEnabled, such that in either Alloy\r\n\r\n{code}\r\n\r\n{code}\r\n\r\nor\r\n\r\n{code}\r\nTi.UI.createView({\r\n soundEffectsEnabled : false\r\n});\r\n{code}\r\n\r\nWhere View is any kind of View (View, Label, Image, etc)", "attachment": [], "flagged": false, "summary": "Android: Remove Default Sound Effect when touchEnabled = false", "creator": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android", "closedSprints": [ { "id": 847, "state": "closed", "name": "2017 Sprint 05 SDK", "startDate": "2017-02-26T17:39:21.095Z", "endDate": "2017-03-12T17:39:00.000Z", "completeDate": "2017-03-12T19:14:38.838Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "285834", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Makes sense. Moving this enhancement request to engineering for further evaluation.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-26T07:21:38.000+0000", "updated": "2013-12-26T07:21:38.000+0000" }, { "id": "334156", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/5373", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-01T19:30:27.000+0000", "updated": "2014-12-01T19:30:27.000+0000" }, { "id": "334208", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "IMHO - this should enabled by default, native Android apps have that kind of behaviour.\r\n\r\n\r\nSo, sound should be played only if view have touch events added.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-12-01T22:03:46.000+0000", "updated": "2014-12-01T22:03:46.000+0000" }, { "id": "334559", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I agree. I've been rolling a custom version of the Ti Android SDK that work this way for almost a year. Touch sounds on non-interactive items is just plain wrong.\r\n\r\nThis is what I use:\r\n\r\n{code}\r\nprotected void registerForTouch(final View touchable)\r\n{\r\n\tif (touchable == null) {\r\n\t\treturn;\r\n\t}\r\n\t\t\r\n\tif (proxy.hasProperty(TiC.PROPERTY_TOUCH_ENABLED)) {\r\n\t\tboolean enabled = TiConvert.toBoolean(proxy.getProperty(TiC.PROPERTY_TOUCH_ENABLED), true);\r\n\t\tif (!enabled) {\r\n\t\t\tif (touchable.getClass().toString() != android.widget.TextView.class.toString()) {\r\n\t\t\t\t//setting enabled on some early versions of 4.0 causes a Java exception when the label has no text\r\n\t\t\t\ttouchable.setEnabled(false);\r\n\t\t\t}\r\n\t\t\ttouchable.setSoundEffectsEnabled(false);\r\n\t\t} else {\r\n\t\t\ttouchable.setSoundEffectsEnabled(true);\r\n\t\t}\r\n\t} else {\r\n\t\ttouchable.setSoundEffectsEnabled(false); //Turn off the touch sound unless this item is specifically set to touch enabled\r\n\t}\r\n\tregisterTouchEvents(touchable);\r\n\r\n\t// Previously, we used the single tap handling above to fire our click event. It doesn't\r\n\t// work: a single tap is not the same as a click. A click can be held for a while before\r\n\t// lifting the finger; a single-tap is only generated from a quick tap (which will also cause\r\n\t// a click.) We wanted to do it in single-tap handling presumably because the singletap\r\n\t// listener gets a MotionEvent, which gives us the information we want to provide to our\r\n\t// users in our click event, whereas Android's standard OnClickListener does _not_ contain\r\n\t// that info. However, an \"up\" seems to always occur before the click listener gets invoked,\r\n\t// so we store the last up event's x,y coordinates (see onTouch above) and use them here.\r\n\t// Note: AdapterView throws an exception if you try to put a click listener on it.\r\n\tdoSetClickable(touchable);\r\n\r\n}\r\n{code}", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-03T17:51:18.000+0000", "updated": "2014-12-03T17:51:18.000+0000" }, { "id": "406270", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Updated PR: https://github.com/appcelerator/titanium_mobile/pull/8816\r\n\r\nBasically, we should normalize the SDK behavior to the native behaviorm which is described above.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-03T13:42:04.000+0000", "updated": "2017-02-03T13:42:04.000+0000" }, { "id": "408165", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Lastest PR: https://github.com/appcelerator/titanium_mobile/pull/8852", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-28T19:49:43.000+0000", "updated": "2017-02-28T19:49:43.000+0000" }, { "id": "409581", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing https://github.com/appcelerator/titanium_mobile/pull/8816 \r\nFind above the current PR", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T19:44:55.000+0000", "updated": "2017-03-07T19:44:55.000+0000" }, { "id": "409657", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Improvement present in SDK build 6.1.0.v20170307124208 \r\nTest information available in https://github.com/appcelerator/titanium_mobile/pull/8852 ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T22:05:55.000+0000", "updated": "2017-03-07T22:05:55.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }