Start a new topic

Java and Javascript (Android)

Java and Javascript (Android)


Hi,

For my project (android) I have created a SQL lite database. I would like to send strings from my database to my Javascript files to display them in my AR world.I have seen methods such as architectView.calljavascript() but im not fully sure what to put in the parameters and how it sends it from Java to Js. How would I then call the methods in my JS?

 

Regards

architectView.callJavaScript function executes the passed String as a command in the WebView.

Let's assume you have a function in your AR-experience's JS, like

function foo(param) { ... }

executing architectView.callJavaScript("foo('myParam');"); will execute your JS function.
Ensure to properly encode parameters, e.g. JSON-files.

Best regards
Login or Signup to post a comment