Currently extension is not for xwalk core library. We support addJavascriptInterface and evaluateJavascript in core library. It would be great if you can share what errors you met. Thanks.
Yongsheng > -----Original Message----- > From: Crosswalk-dev [mailto:[email protected]] > On Behalf Of GIBERT Xavier > Sent: Thursday, April 24, 2014 10:44 PM > To: Alexis Menard > Cc: [email protected] > Subject: Re: [Crosswalk-dev] Java-Javascript interface > > Quoting Alexis Menard <[email protected]>: > > > Hi, > > > > On Thu, Apr 24, 2014 at 11:30 AM, GIBERT Xavier <[email protected]> > > wrote: > >> Hello, I successfully integrated the xwalk_core_library project with > >> my Android app, replacing the original webview by the XWalkView. > >> > >> It works perfectly until I call one of the old JavascriptInterface > >> methods that I used with the webview. > >> > > > > Thanks for trying Crosswalk. > > > >> From what I know, the JavascriptInterface cannot be used with the > XWalkView. > >> I was wondering what is then the best option to implement a > >> Java-Javascript interface for XWalkView. An internal Extension? I > >> have only found a tutorial to create an external extension, not > >> internal; what is very complicated because at almost each command of > >> the crosswalk building tutorials I get errors; and I think I will not > >> be able to access the application variables, that is what I want to share. > > > > https://crosswalk-project.org/#wiki/Writing-a-Crosswalk-Java-Extension > > -on-Android > > > > Is it what you have been following? > > Yes, I red it in Github but I've seen that is exactly the same. I haven't > tried it yet > because I am afraid it is not what I am looking for. With an external API I > guess I > won't be able to access my application variables, just Android device > functions. > Maybe I am wrong. And I definelly don't want to implement a network > connection between the two sides, e.g sockets). > > Thanks for your time. > > > > > >> > >> Can you help me with some indications about how to implement this > >> sharing of variables (methods returning the variables) between > >> Android application and XWalkView javascript code. What I want to > >> share is mainly the Android Preferences. > >> > >> Thanks a lot, regards. > >> > >> Xavi > >> > >> ---------------------------------------------------------------- > >> This message was sent using IMP, the Internet Messaging Program. > >> > >> > >> _______________________________________________ > >> Crosswalk-dev mailing list > >> [email protected] > >> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev > > > > > > > > -- > > Alexis Menard > > > > > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > _______________________________________________ > Crosswalk-dev mailing list > [email protected] > https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev _______________________________________________ Crosswalk-dev mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
