[TIMOB-3539] Android: No Ti Javascript injection to webview
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-07-07T11:15:55.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | Sprint 2011-25 |
Components | Android |
Labels | android |
Reporter | KT |
Assignee | Don Thorp |
Created | 2011-04-15T03:46:27.000+0000 |
Updated | 2011-07-07T11:15:55.000+0000 |
Description
evalJS() doesn't work, period, on Android 2.2, but seems to on 1.6 and 3.0.
However, communicating back from the webview to the application doesn't work because there doesn't seem to be a similar mechanism in place as there is on iOS to inject the necessary Javascript at the head of the HTML, resulting in errors like:
E/Web Console( 504): ReferenceError: Can't find variable: Ti at file: ...
when trying to do something like Ti.App.fireEvent().
For reference: http://developer.appcelerator.com/question/118231/ti-injection-for-webview-failing-on-android"> http://developer.appcelerator.com/question/118231/ti-injection-for-webview-failing-on-android
The following code demonstrates that Titanium now works as expected:
Note this ticket is duplicated in TIMOB-3554
Closing as invalid per Paul's comment.