Start a new topic

android : using pictures saved in internal storage in html

android : using pictures saved in internal storage in html


Hi there!

Given fact that the ARchitectView is a GroupView, you may e.g. use this (untested) approach

private static void modifyArchitectWebView(View rootView) {

if (rootView instanceof WebView) { 

// TODO apply your changes here - without any warranty on side-effects!

final WebView architectWebView = (WebView)rootView;

}

else if (rootView instanceof ViewGroup) {

final int childCount = ((ViewGroup)rootView).getChildCount();

for (int i=0; i< childCount; i++) {

modifyArchitectWebView(((ViewGroup)rootView).getChildAt(i));

}

}

}

 

...

modifyArchitectWebView(findViewById(R.id.architectView));

 

Note: Changes in WebView may affect behavior of the Wikitude SDK

Thanks it works ! (I just had to change the return statement of your proposition to void)

Hi, thanks for the help.

Sorry for the delay but my project was pending.
So now I want to access the Webview of the ArchitectView but how to do that?
I understand that the WebView is contained in ArchitectView but I don't find any function allowing to access the WebView in documentation.

Thanks.

 

Hi Arthur!

Accessing images from external storage is not part of the Wikitude SDK as such.
What you see on top of your camera is a customized default Android WebView, with all of its features and limitations.

Please have a look at e.g. stackoverflow discussions on this topic.
Hope this helps.

Kind regards,
Andreas

Hi,

I am developing an app based on the wikitude sample "browsing pois -> native detail screen".

When a POI is clicked, I would like to display in the details panel a picture present in my internal storage (the picture is taken by the user in the same app so I can't place it in my assets folder).

Is there a way to do that ? Can we access the pictures present in internal storage of the app (or from pictures folder of the phone) from index.html ?

Thanks.
Login or Signup to post a comment