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
- js_image_succeded(); //directly
- 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