Start a new topic

How to make PhoneGap Functions work inside the ARchitect World

How to make PhoneGap Functions work inside the ARchitect World


After playing a video, I want to redirect to another page using phonegap functions, window.open , but it's not currently working. How can I make this work? Thanks!

When running AR content inside the Wikitude SDK you won't have access to phonegap functions. At least not directly. As these are 2 separate worlds you will need to signal back to phonegap by setting the document.location to an URL starting with architectsdk://

Inside the phonegap world you are able to react on such urls and act according to your usecase. See the phonegap reference:

http://www.wikitude.com/external/doc/documentation/3.2/phonegap/referencephonegap.html#phonegap-plugin-reference 

-> especially onUrlInvoke

You can have a look at our Phonegap sample as well. It makes use of this technique and uses the WikitudePlugin.js which wraps the cordova.exec calls nicely.
Login or Signup to post a comment