I'm glad you have all information you need.
If everything goes well, 6.1 will be released by the end of this month.
Thanks a lot for these precises answers. We now have all the inputs to start coding confidently :-)
Hope that the SDK 6.1 will be released soon.
Sorry for the late response! Here are your answers (Which I'm happy to answer, don't worry; )):
1) I would say no. You might be able to pass some objects from Cordova to Architect, but all Cordova runtime events (I don't know what they do in the background) I don't expect to work. I'm also pretty sure that calls to `require` would not work. In short, Cordova and Architect live in two different web views which comes close to two separate processes.
2) With SDK 6.1 we will introduce a new way to communicate from Architect to the hosting application by passing a JS object that can be converted to a JSON object. This object is then available in the hosting application. In theory it doesn't offer more functionality, but a more easier interface which can be used even if the web view does some internal layouting.
Hi Andreas and thanks for your answer.
To be clear and close this topic, could you answer exactly these two questions (don't hesitate to ask me if these are not clear) :
- is there a way (even complicated) to access cordova object + plugins from the AR View ?
- are the two mechanism your mentionned the only way to pass data from the Cordova View to/from the AR View ?
Sorry to insist and ask for clarity on these points, but your answers are important for us as we are spending time to build a Ionic 2 bridge between the AR and Cordova view. We are building this bridge on top of what Wikitude allows, then any extra information about what WIkitude is allowing is gold for us at the moment.
Sorry for the late response, but somehow I didn't got the notification that you replied.
Currently the best thing you can do is what you already wrote: use the document.location = ... mechanism to get from Architect -> JS and then callJavaScrpt to get back into the Architect World.
I will have a look at the plugin you mentioned because it looks really interesting, but don't wait for a official support of this in the near future as our roadmap for 2017 is already quite full.
The second part of my question was about the fusion of the two webviews, and you answered it, thanks.
The first part is about accessing the cordova object and plugins from the AR View. Is there some way to do that ? Like with this cordova plugin.
I did some extended tests on my side, and the best I can achieve, is too access the cordova object from the AR View on iOS. The problem is that I never have the deviceReady event, so I guess cordova initialization is not complete on this WebView.
About the way to communicate between the two WebViews, are these the only two solutions ?
The Wikitude Cordova plugin will always use it's own web view. There is no way to directly use either cordova or Architect commands in one combined web view. You can however communicate between these two web views with the help of the Wikitude cordova plugin? Is that something you're interested in or was the question about a general fusion of those two web views.
@Wikitude : is there a way to make the cordova object and plugins directly accessible from the AR webview ? Or to directly add the AR World in the initial webview ?
Hi Jose and Andreas,
I tried to use the crosswalk cordova plugin, but I still have two webview generated : a initial webview, and a AR webview launched by the wikitude plugin.
@Andreas : is there a way to make the cordova object and plugins directly accessible from the AR webview ? Or to directly add the AR World in the initial webview ?