Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling Vaadin JS function from cordova.InAppBrowser
we have defined the following JS function in Vaadin
JavaScript js = com.vaadin.ui.JavaScript.getCurrent();
js.addFunction('js_image_succeded', new JavaScriptFunction() {
@Override
public void call(final JsonArray arguments) {
UI.getCurrent().access(new Runnable() {
@Override
public void run() {
succeeded(arguments);
}
});
}
});
We are running an hybrid mobile app, In UIwebview within iOS, we are able to call these using stringByEvaluatingJavaScriptFromString.
Now porting into Android and using cordova here.
i used var ref = cordova.InAppBrowser.open(url, target, options);
Here, now am unable to call these javascript functions from cordova.
Tried the following
1. js_image_succeded(); //directly
2. ref.executeScript({ code: "js_image_succeded()"});
it says I/chromium: [INFO:CONSOLE(314)] "Uncaught ReferenceError: js_image_succeded is not defined"
kindly let me know anyway we can call these JS functions please