{ "id": "123858", "key": "AC-2206", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-12-23T02:27:50.000+0000", "created": "2013-12-17T15:06:13.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "33974", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "124090", "key": "TIMOB-16063", "fields": { "summary": "Android: Field Service App crashes with java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:12.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." } ], "description": "In an alloy view, setting touchEnabled='false' on any view type (view, label, etc) will throw\r\n\r\n[ERROR] : TiApplication: (main) [98,98] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gstreetmedia.threetwotest/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean; Titanium 3.2.0,2013/12/16 06:43,2a93aca\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gstreetmedia.threetwotest/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.access$700(ActivityThread.java:135)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)\r\n[ERROR] : TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiApplication: \tat android.os.Looper.loop(Looper.java:137)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:4998)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invoke(Method.java:515)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)\r\n[ERROR] : TiApplication: \tat dalvik.system.NativeStart.main(Native Method)\r\n[ERROR] : TiApplication: Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1455)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1270)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:474)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:451)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:489)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:473)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:451)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:568)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:546)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:303)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:32)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:451)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:527)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)\r\n[ERROR] : TiApplication: \tat android.app.Activity.performCreate(Activity.java:5243)\r\n[ERROR] : TiApplication: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)\r\n[ERROR] : TiApplication: \t... 11 more\r\n\r\nindex.xml is as follows\r\n\r\n\r\n\t\r\n\t\t\r\n\t\r\n", "attachment": [], "flagged": false, "summary": "Android touchEnabled=false throws java error", "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": "Studio 3.1.2. SDK 3.2.0.v20131216064236. Android 4.4. Nexus 7", "comment": { "comments": [ { "id": "284849", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Suggestion for fixing this is to update TiUIView.java with\n\nprotected void registerForTouch(final View touchable)\n{\n\tif (touchable == null) {\n\t\treturn;\n\t}\n\t\n\tboolean clickable = true;\n\tif (proxy.hasProperty(TiC.PROPERTY_TOUCH_ENABLED)) {\n\t\tObject obj = proxy.getProperty(TiC.PROPERTY_TOUCH_ENABLED);\n\t\tif (obj.getClass().equals(String.class)) {\n\t\t\tclickable = obj.equals(\"false\") ? false : true;\n\t\t} else if (obj.getClass().equals(Boolean.class)) {\n\t\t\tclickable = (Boolean) obj;\n\t\t}\n\t}\n\tif (clickable) {\n\t\tregisterTouchEvents(touchable);\n\t\t// Previously, we used the single tap handling above to fire our click event. It doesn't\n\t\t// work: a single tap is not the same as a click. A click can be held for a while before\n\t\t// lifting the finger; a single-tap is only generated from a quick tap (which will also cause\n\t\t// a click.) We wanted to do it in single-tap handling presumably because the singletap\n\t\t// listener gets a MotionEvent, which gives us the information we want to provide to our\n\t\t// users in our click event, whereas Android's standard OnClickListener does _not_ contain\n\t\t// that info. However, an \"up\" seems to always occur before the click listener gets invoked,\n\t\t// so we store the last up event's x,y coordinates (see onTouch above) and use them here.\n\t\t// Note: AdapterView throws an exception if you try to put a click listener on it.\n\t\tdoSetClickable(touchable);\n\t} else {\n\t\ttouchable.setSoundEffectsEnabled(false);\n\t}\n}", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-17T20:53:47.000+0000", "updated": "2013-12-17T20:53:47.000+0000" }, { "id": "285603", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for reporting this issue and suggesting a solution. This issue is already covered by TIMOB-16063 and being actively worked upon by the engineering team. Please watch TIMOB-16063 for further updates.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-23T02:27:35.000+0000", "updated": "2013-12-23T02:27:35.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }