I would like to show an image in webviewer.
I tried this in the html file (developpement path):
but it didn’t work.
is the html file you like to display also in the assets?
just use this path then
in case you do not use a html file, see here https://puravidaapps.com/snippets.php#2ani
Thank for your answer Taifun.
I tried that too but it didn’t work.
In fact i’m not using a real html file, i pass the html code through a call webviewer.LoadHtml.
The image is imported in the media (so i assume it’s in the assets folder).
I also tried your solution : file:///mnt/sdcard/AppInventor/assets/imagename.png
I got a broken link image response.
I don’t know if the LoadHtml method will work for this
put that html file into the assets and call it using the GoToUrl method
Tried that but i got this answer : file:///mnt/sdcard/AppInventor/assets/WebViewString.html exposed beyond app through Intent.getData()
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
ListSort.php create the html file content (just some text and two images) when UpdateSortList is clicked
Then call Web5
WebViewString get the responseContent
Then the WebViewString is passed to the WebViewer1
The WebViewString.html file in media is:
<html> <script> document.write(window.AppInventor.getWebViewString()); </script> </html>
With that code nothing appears in the webviewer and i got this error message: file:///mnt/sdcard/AppInventor/assets/WebViewString.html exposed beyond app through Intent.getData()
With the other solution wich pass all the html content directly trought the webviewer, the text is then visible but the images are not (broken link signal in the webviewer). the code is almost the same, i just use webviewer.LoadHtml instead of webviewer.GoToUrl (and no WebViewString is required).
does the example work for you?
How does the property Webviewer.WebViewString work?