Start a new topic

how can I transmit a parameter from java to html or AR world?

how can I transmit a parameter from java to html or AR world?

I have tried to use calljavascript to do this but it not work.I have no idea.
My code is under.

In andoird java code:

architectView.callJavascript("data(1)");

In html where I load for ar world:

var aa=0;
function data(t){
aa=t;
}
alert(aa);

but it does not work. aa is still 0 not 1 which I transmit from java.
How can I fix it.I want transmit parameter from java to Html and ARworld.
thanks a lot

Hi Lu,

is your data function getting called? Is the function data in global scope? If you added it to the World object you will need to call World.data(1).

Thank you and best regards,
Simon
Login or Signup to post a comment