Start a new topic

Passing parameter to index.html

Passing parameter to index.html

How do i pass parameters while loading the ArchitectView? I need to pass the imagepath url to index.html for image overlay. I tired the following which doesnt work.

Method 1: this.architectView.load("arviews/ImageOnTarget/index.html?imagePath=testing");

Method 2:

String myOtherUrl =
"arviews/ImageOnTarget/index.html?imagePath=" + URLEncoder.encode(imagePath, "UTF-8");
Log.e(this.getClass().getName(), " myOtherUrl:"+myOtherUrl);



Method 3:





08-06 20:19:13.243    3500-3507/com.wikitude.virtualhome W/art? Suspending all threads took: 5.372ms

08-06 20:19:13.243    3500-3500/com.wikitude.virtualhome I/Timeline? Timeline: Activity_idle id: android.os.BinderProxy@91af8e9 time:8769198

08-06 20:19:13.273    3500-3500/com.wikitude.virtualhome I/chromium? "Uncaught ReferenceError: AR is not defined", source:  (1)



Hi Swentha,

Passing parameters when html is in assets-folder is not supported by Android (compare e.g. stackoverflow)
You need to use architectView.callJavaScript() to inject your values or host html on a server to pass params via url.

Best regards,

Thanks Andreas.

Got it working with calljavascript().
Login or Signup to post a comment