Start a new topic

Communicate JS and Android.

Communicate JS and Android.


 I'm very new using Wikitude API.

My requirement is once poi is detected it would call my own library.

My code is as follows.

Inside js.

var obj = new AR.GeoObject(markerLocation, {onEnterFieldOfVision: function() {
document.location = "architectsdk://outputTTS?text=My";

    return this;

In android

this.architectView.registerUrlListener(new ArchitectUrlListener() {
            // fetch e.g. document.location = "architectsdk://markerselected?id=1";
            public boolean urlWasInvoked(String uriString) {
                Uri invokedUri = Uri.parse(uriString);




My debug point is in java class will not be triggered. If put a alert statment in side js instead of "document.location = "architectsdk://outputTTS?text=My";"

it will work fine.  seems like its not a issue in js side please help me on this.

I don't see anything wrong with the code. Are you registering the URL listener on the same architectView instance that you load the architect world in? Are the examples included in the SDK working (e.g. Example 1.4 Presenting POI Details).

If this does not help, please post the complete code.
Login or Signup to post a comment