Start a new topic

Can't include cordova inside world index.html

Can't include cordova inside world index.html

I am using sample app and if i include cordova.js inside world/3_3dModels_1_3dModelOnTarget/index.html i get error in a form of popup that says gap_init:2 and AR stops working.

I am including cordova.js in correct location src="../../cordova.js". 

If i include my jQuery Mobile code in www/index.html where cordova is already included, and then i call app.loadARchitectWorld(getSamplePath(2, 0)) AR is not working, it says architect://architect is not found.

I tried everything there is, does anyone have idea how to make this work?

Hi Mladen,

I am facing the same problem, did you find a solution ?

Thanks =D

Nope, i don't think that is possibile. I spent too much time trying to debug it and couldn't.

I just created one html page for Cordova and one for Wikitude. 

No one from Wikitude Staff commented on this so it most probably doesn't work for some reason.

Hi MIaden,
You're right, you can't mix cordova with architect. Both live in there own, separated js context (different webviews). But there are ways to communicate from one 'side' to the other 'side'. To transfer information from cordova -> architect, use the 'callJavaScript' function of our cordova plugin. For the other way around, use 'document.location = architectsdk://...' in your architect world and register an architect url listener in your cordova application. You find examples for that in our cordova example application and also here.

Best regards,

Login or Signup to post a comment