By thanaanon
on Fri, 09/20/2013 - 07:19
When I use
private static final String mServerURL = "https://ar.qualcomm.at/samples/cloudreco/json/";
it returns
https://developer.vuforia.com/samples/cloudreco/json/samplebook1.json
{"title":"Cloud Recognition in Vuforia","author":"Karina Borland","average rating":"4","# of ratings":"41","list price":"43.99","your price":"43.15","targetid":"a47d2ea6b762459bb0aed1ae9dbbe405","thumburl":"https://developer.vuforia.com/samples/cloudreco/thumbs/01_thumbnail.png","bookurl":"https://developer.vuforia.com/samples/cloudreco/book1.php"} | |
but when I change to
private static final String mServerURL = "http://ss.cloudtist.com/json/";
which returns
http://ss.cloudtist.com/json/samplebook1.json
{"title":"Cloud Recognition in Vuforia","author":"Karina Borland","average rating":"4","# of ratings":"41","list price":"43.99","your price":"43.15","targetid":"a47d2ea6b762459bb0aed1ae9dbbe405","thumburl":"https://developer.vuforia.com/samples/cloudreco/thumbs/01_thumbnail.png","bookurl":"https://developer.vuforia.com/samples/cloudreco/book1.php"} |
the same
BUT when I run this app on my phone, It is able to detect my marker but show nothing, only loading image.
ps. It only work when I use mServerUrl on Vuforia host, why ?
CloudReco sample app and JSON question
The samplebook1.json file is hosted in the Vuforia host as an example of remote database containing book data (but this is just an example and is not part of the Cloud Reco feature per-se);
CloudReco sample app and JSON question
What I mean is that, I seem like the CloudReco sample app can parse JSON only from vuforia host, but not my host (ss.cloudtist.com/json)
CloudReco sample app and JSON question
If you look at the sample code in CloudReco.java, you will find a class called:
GetBookDataTask
This is where the book data are built from the JSON URL, so you may want to debug the issue in your application by adding some Logs in that piece of code.
CloudReco sample app and JSON question
targetid should not be the same in both cases! it should match the proper id on your own database