Start a new topic

Wikitude Phonegap Plugin with Sencha Touch

Wikitude Phonegap Plugin with Sencha Touch


Hi there,

I am building a Sencha Touch application using the Cordova/Phonegap API's and plugins and am wanting to include a Geolocation AR View within the boundaries of a certain panel in the Sencha Touch app.

Now one way I found I can do this is by placing the code for the Sencha Touch app in the URL of the Architect World so that the Sencha Touch components are overlayed above the AR View. This works fine, but now my problem is I need access to the WikitudePlugin and the other Cordova plugins within the context of the AR World. How do I go about doing this? Or is there a way I can reverse the display of the AR World as in, open the Sencha Touch app and then on the tap of a button, load the AR World without completely hiding the Sencha Touch app?

Please if anyone can help it would be greatly appreciated!

 

Adrian

The PhoneGap application and the AR World are in 2 different WebViews, but you can send messages from the AR World using the "architectsdk://" url scheme (see the sample application for an example)

Hi Gabriele,

I can't seem to find where this communication between the webviews happens in the sample application from github? Could you please advise which world it is in?

Thank you!

For example in 5.6: the "capture screen" function is implemented in the PhoneGap application, and accessed through the URL "architectsdk://button?action=captureScreen".

Hi Gabriele,

Thank you for your assistance thus far. As I understand it, I can setup the url invoke listener in the root js where the architect view is loaded from and then from the context of the World, I can use document.location = "architectsdk://function?etc=this"?

But how do I make Cordova plugins available to the architect world? Because from the architect view, we need to be able to read/write to sqlite databases using the sqlite plugin and also perform other functions provided by cordova. I have tried referencing "../cordova.js" in the architect index.html, but the plugins don't seem to be loading. And creating cordova functions available over the architectsdk URL scheme won't work either because they are non-blocking and need to fire callbakc functions in the architect view.

Please help...? 

 

It's not possible to use Cordova plugins inside the AR World. The current architecture of the Cordova plugin does not allow this kind of integration. The AR World and the main application live in 2 separate WebView, and the only way to use functions of the Cordova environment is to use the architectsdk:// callback scheme.
Login or Signup to post a comment