Hi guys, please can someone tell me is it possible to navigate from a loaded world to a phonegap shopping basket page for example, having already loaded the product id to add to the basket ? i wonder if it can be done especially that almost of the docs say that these two world are isolated, how can i do that plz? thx
best regards
S
Simon 248601
said
about 8 years ago
Hi Sinda,
for example you could add the document.location directive to an onClick listener of a Button and use this button on one of your Trackables.
var pageOneButton = new AR.ImageDrawable(this.imgButton, size, options);
var pageOne = new AR.Trackable2DObject(this.tracker, "pageOne", {
drawables: {
cam:
}
});
If the user then clicks on that button the function "onUrlInvoke" in file "js/index.js" (if you use the code from the sample app) or any other function you define with:
app.wikitudePlugin.setOnUrlInvokeCallback( pass the function you want to be called here );
In that function you are then able to call any other JS function you want.
sinda lf