Log in or register to post comments

CloudReco sample app and JSON question

September 20, 2013 - 12:19am #1

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

October 31, 2013 - 6:48pm #5

targetid should not be the same in both cases! it should match the proper id on your own database

CloudReco sample app and JSON question

September 20, 2013 - 5:29am #4

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

September 20, 2013 - 12:42am #3

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)

And I setup my cloud database and attached the metadata whic contain only "samplebook1.json" string, It works well when detecting my target, "but show nothing, only loading image" after recognize my target, which I guess that is the problem about mServerURL.  

CloudReco sample app and JSON question

September 20, 2013 - 12:29am #2

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);

so, to make it work you would need to recreate a database containing sample books data on your own server, but such implementation is up to you.

 

 

Log in or register to post comments