If you can please send me a sample project in wich you call a java function
from javascript from a cordova project. That might be very helpfull. And also
add this to the documentation because I don't think I'm th eonly one here
try'ing to achieve that.
Thnak you very much,Alex
On Wednesday, January 7, 2015 3:15 PM, Alex Stanese
<[email protected]> wrote:
Hello! First I wish to congratulate the whole team for this awesome
project!Secondly I need some help regarding the communication between crosswalk
and java.I used to create phonegap apps and now I implement the code into
crosswalk.Before, in phonegap apps, I used to add these lines in Java:
JavaScriptInterface jsInterface = new JavaScriptInterface(this);
appView.getSettings().setJavaScriptEnabled(true);
appView.addJavascriptInterface(jsInterface, "JSInterface");
and
public class JavaScriptInterface { private Activity activity;
public JavaScriptInterface(Activity activiy) { this.activity
= activiy; }
@JavascriptInterface public void showLog(){
Log.v("blah", "blah blah"); }
} and call from JS with window.JSInterface.showLog();
But now, in crosswalk apps, I get this error: The method getSettings() is
undefined for the type CordovaWebView
I really need to get this working. Please help!
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help