Start a new topic
Solved

External .wtc file on android

External .wtc file on android

I did it. if someone is interested: 

 

// JSON file describing the AR-experience for offline usage

var projectJSONOffline;

jQuery.ajax({
url: 'myserver/jsonfile.json',
success: function (result) {
if (result.isOk == false) alert(result.message);

//result string into json object
var jsonObj = jQuery.parseJSON(result);

projectJSONOffline = jsonObj;
},
async: false
});

 



Hello Eva,

thank you. I did what you said and now instead of downloading the file I use the url from my server and it works very well.

Is it possible to do the same for the project.js? I also want to load the project file from my server because I will generate my own project.jss according to the Json structure from wikitude. The problem is that the project.js file is never called, only the variable inside.

thank you in advance. 

Rafael
Hello Rafael,

You can load the wtc file from a custom url, either from the device, or from a remote server. You can specify the URL either in code or by ticking ?Use custom URL? in the client tracker and writing the url there.

There is a sample showing how to load from a server called ?Client Recognition - Runtime Tracker?, and there is documentation written here: http://www.wikitude.com/external/doc/documentation/latest/unity/clientrecognitionnative.html#runtime-tracker

Thanks
Hi guys,
I'm using the Wikitude SDK on Android with javascript. I started with the template (WikitudeStudioAndroidAppTemplate) and I changed the project.js (the file with the json) in order to change the tracker.wtc because I'm using a tracker.wtc that I donwload from my server.

json example

{"isCloud":false,"tcId":"580f33238b5b5c1b28b96e3f","name":"museum","wtcFiles":
Login or Signup to post a comment