Start a new topic

Set architectsdk:// from within an HtmlDrawable

Set architectsdk:// from within an HtmlDrawable


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

I actually realised it already and do the thing you suggested,

 

But anyway, thanks for the answer.

 

 

Hi there, 

 

I'm working on an Android app.

 

I'm 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.
Login or Signup to post a comment