Start a new topic

JS or Java(Android) to Server ??

JS or Java(Android) to Server ??

Hello, i am trying to inderstand the example of the "ObtainDataFromWebService", and i have some difficulties to inderstand how the request work : how does work  the data cycle between JS Android and Server?

- From JS to Server 

- From JS to Android to Server

- Or other way 


Hi there!

Let's assume you want to fetch dynamic JSON data which is required for your AR experience.

* In case you already have the data inside your application model (read from DB), you may inject the data using architectView.callJavaScript('init(' + setUpJSONData +');').

  you can then grab the JSON inside your JS environment.

* In cae you need the data only for AR and like to minimize platform specific coding you should load the data from your server using e.g. jQuery.

* Use architectsdk:// protocol to pass information from JS to your native code (compare native POI detail screen). This allows you to reuse native screens instead of reimplementing them in HTML.

As a recommendation: Try to implement as much as possible in JS/HTML so you can easily run your experience on any other supported platform (Smart Glasses, Android, iOS)

Please find a detailed documentation in the Android SDK Sample app documentation.


Kind regards
Login or Signup to post a comment