{ "id": "62802", "key": "TIMOB-2170", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:18.000+0000", "created": "2011-04-15T03:12:34.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "android_refactor", "events", "fireevent", "patch", "regression", "ti.app", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:18.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": "{html}
In testing StatusNet Mobile against the new 1.5 Android code in\ntrunk, I've found that custom application events fired from\nJavaScript code running within a WebView no longer work. This is\nneeded for our app to communicate between the main UI code and the\nWebView that displays our message timelines.
\nI believe I've tracked it to commit\n7926eda7aad2fa2073aad2849f4ed890c5807e00
\nThis commit removes AppModule.fireEvent(), which used to\noverride the default KrollProxy event handler function with a call\nto fireAppEvent() on the current app retrieved from the current\ncontext. I believe that breaks the code in\nTiWebViewBinding.AppBinding.fireEvent(), which calls fireEvent()\ndirectly on a private AppModule instance.
\nWith the AppModule.fireEvent() hack removed, it looks like\nthat'll just fire events on the individual instance and not call\nthe global application.
Provisional fix that works for me:
\nhttp://github.com/brion/titanium_mobile/tree/2170
\n\nhttp://github.com/brion/titanium_mobile/commit/73a02241a1df8b1697e9...
\nhttp://github.com/appcelerator/titanium_mobile/pull/9
(from [9a3a817dd712309535cad518dae779ce24b7d5ba])\npull the App and API modules from TiApp instead of creating them\nfor each instance, thanks to Brion Vibber for the find and\nsuggestion. also cleared up some warnings [#2170\nstate:fixed-in-qa] \nhttp://github.com/appcelerator/titanium_mobile/commit/9a3a817dd7123...
Titanium SDK version: 1.5.0 (12/04/10 08:46 b7b9e78)