Also, please refer to this link to see how you can send a json object to a platform.
Thanks
Eva
HI Eva,
I am using Wikitude SDK version: 6.1.0 and JS api.
not using any extensions. I am using android studio.
I am getting warning like Below:
05-29 20:28:09.302 24419-24419/com.example.santhosh.onboardar W/cr_Ime: updateState: type [0->0], flags [0], show [false],
05-29 20:28:09.340 24419-24532/com.example.santhosh.onboardar W/CallbackHandler: forwardJSONObject: There are no ArchitectJavaScriptInterfaceListener set.
Use architectView.addArchitectJavaScriptInterfaceListener to receive the data.
Please help me in how to use architectView.addArchitectJavaScriptInterfaceListener to receive the data.
Thanks
Hi
your code to use the ArchitectView should look similar to this:
architectView = (ArchitectView)this.findViewById( this.getArchitectViewId() ); final ArchitectStartupConfiguration config = new ArchitectStartupConfiguration(); config.setLicenseKey( KEY ); architectView.onCreate( config );
To enable receiving data from JavaScript you have to add the following line after architectView.onCreate
architectView.addArchitectJavaScriptInterfaceListener(this); // this refers to the MainActivity implementing the ArchitectJavaScriptInterfaceListener
Best Regards,
Alex
Thanks Alex. Its working. :)
santhosh reddyshetty
HI Team
I am getting below message in monitor if i clicked a button in javascript to send json to native code.
05-29 20:28:09.302 24419-24419/com.example.santhosh.onboardar W/cr_Ime: updateState: type [0->0], flags [0], show [false],
05-29 20:28:09.340 24419-24532/com.example.santhosh.onboardar W/CallbackHandler: forwardJSONObject: There are no ArchitectJavaScriptInterfaceListener set.
Use architectView.addArchitectJavaScriptInterfaceListener to receive the data.
I have implemented ArchitectJavaScriptInterfaceListener in native code as below: