[TIMOB-16249] Android: Web view evalJS is not working on Android versions >= JELLY_BEAN_MR1
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-02-06T18:20:02.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | Release 3.3.0 |
Components | Android |
Labels | andoid, supportTeam |
Reporter | grebulon |
Assignee | Hieu Pham |
Created | 2014-01-19T10:32:28.000+0000 |
Updated | 2017-03-22T20:44:07.000+0000 |
Description
TiReturn::setValue should be declared with @JavascriptInterface annotation.
File: android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebViewBinding.java
line: 174
Change the declaration of setValue() to:
@JavascriptInterface
public void setValue(String value)
[~buddyguards] Thanks for suggesting the solution but it would be helpful if you can post a simple test case to demonstrate the problem as well. We would move this ticket to engineering as soon as we are able to reproduce it with a test case.
Very simple:
title will be null. Note that the @JavascriptInterface is required only on late versions of Android. I tested it with 4.3, and as soon as I added the annotation, it started to work.
Moving this ticket to engineering as I can reproduce this issue with the provided test case.
I have noticed the same issue in:
Problem: twitter-adapter cannot work, because the library selects pin from html-page. I think it is urgent to solve it. Unsolved we cannot work with (HTML)-oauth!
I cannot finf this file in my system: TiWebViewBinding.java
Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.