1

I'm working on an Android app and trying to implement the following solution:

within an HtmlDrawable I have a set of elements with onClick events.

By clicking on these elements I want to communicate back to the Java code of the app using the "architectsdk://" url technique.

But I don't see any response in my ArchitectView.ArchitectUrlListener() implementation.

Another note: when I set onClick event of the HtmlDrawable itself then I successfully notified within the Java code.

So the question: is it possible to communicate back to Java code from an HtmlDrawable or I need to create each element separatly and places onclicks on them?

Thanks in advance.

Ilya Zatolokin
  • 221
  • 2
  • 11

1 Answers1

1

I've got an answer on the Wikitude's forum:

In case if someone needs it:

HtmlDrawables live in a different context, you therefore cannot use architectsdk to communication with native Android/iOS urlListener. I recommend using HtmlDrawables onClick listener instead.

e.g. myHtmlDrawables.onClick = function() { document.location="architectsdk://mydrawables?clicked=1"; return true; }

Best regards

Ilya Zatolokin
  • 221
  • 2
  • 11