Using LiveConnect, calling a function doesn't pass the strings properly

361 Views Asked by At

I've got a little problem with calling javascript functions via liveconnect on java. It's not calling the function with the proper items, as the Safari console just classes the objects as "RuntimeObject" but in javascript i use:

chat.call("message", new String[]{ action, data });

arguments action and data are not being forwarded as proper strings, even though they are referenced as Java Strings. Is there something obvious and silly I'm missing out here?

kenny

1

There are 1 best solutions below

0
kennyisaheadbanger On

I have fixed this buy in the javascript adding:

action = action + "";
data = data + "";

and it casts the objects to strings, so it now works :)