the application is not able to let me connect to the JSON file, while the same code works from the browser, but for some reason I am not able to dowload the data
could you please help me to fix this issue?
Thanks a mil.
A
Andreas Fötschl
said
almost 11 years ago
Hi there!
I guess you want to display a number of POIs in the camera. The "Hello World" Sample in our PhoneGap github-sample should only point out how you can interact with one "AR.Label" in ARchitect.
In your case you want to inject a number of POIs and display them as so called "AR.GeoObjects". Interaction and setup is quite similar. Please have a look at the SimpleARBrowser sample in the wikitudesdk.zip you downloaded from wikitude.com
Keep in mind that all the HTML/ARchitect world samples work on phoneGap same way than in any WikitudeSDK. You develop the ARchitect experience once and can display it using the iOS/Android/BB SDK or PhoneGap
Hope that helps.
Cheers, Andi
S
Salvo Esposito
said
almost 11 years ago
Hello,
I am starting using your SDK, I have downloaded the "HelloWorld" example I have renamed the newData(jsonData) method with jsonpdataPOI(jsonData)
I Need to be able to download data directly from the HelloWorld.hml
You will see in highlighted in yellow the extra code that I have added on "HelloWorld" page.
the AR.context.onLocationChanged = locationChanged; looks like not being called, then the data non downloaded
Could you please help me to sort this?
Thanks.
S
----> myGeoLocation = null;
//function called from the native app fia callJavascript method
//receives json-data as string and processes the contained information
// Set the on location changed trigger to call 'locationChanged'
AR.context.onLocationChanged = locationChanged;
A
Andreas Fötschl
said
almost 11 years ago
Hi there!
You're making good progress. Looks good so far. Quite hard to see the mistake/error without having the full sample in place.
Anyway: I recommend you to reach the goal step-by-step.
Import ade.js in oyur World's html as described in the ADE.html in the ArchitectTools Folder of the SDK (<script type="text/javascript" src="ade.js"></script>)
Having ade.js imported you can open the world on your dektop PC's browser and use JS Debugging tools, browser plugins or simply use the Inspect Element/JS Console feature of your preferred browser
Assure your JSON requests work as expected by adding the equest-command to the "onDeviceIsReadyCallback"-function and to some logging output there
Check if SIM is in your device (some Android ROM's do not fire location updates without SIM inserted) or use LocationSpoofer app for Android
The ade.js is something really helpfull - You can develop way faster since errors and debug information is provided. (You may write "AR.logger.debug("yourMessage");" and see it in the logging console.
Salvo Esposito