I use wikitude javascript librarys in Android app.
When a target image is recognised apllication creates a button overlay. That done in javascript. Java sould capture when button is pressed. As I understood it should be done in ArchitectUrlListener, because in Wikitude's example it's done like that.
How to do that? Do I need to give an Id to that button? And it seems like invokedUri.getHost() returnes nothing.
Wenhao
S
Simon 248601
said
over 7 years ago
Hi Wenhao,
you are right, you can achieve what you want by using the Architect.UrlListener.
To call the Architect.UrlListener from JavaScript use:
You will need to use the first part of the string "architectsdk://" or the url listener won't pick up the call. If you want to convert the passed value into a Java url object the rest of the string value needs to conform to the standard url pattern. The first value will be the host name, parameters will be indicated by the question mark and so on.
To use this in your button override the onClick method and make the call:
wenhao wu