In the local html file that is displayed in the web view, I want to be able to call the image from the application data directory. I tried several src options in my html but nobody works.
I load the html file from the application data directory like this:
var win = Ti.UI.currentWindow; var rootDir = Ti.Filesystem.getExternalStorageDirectory(); var webUrl = rootDir + 'index.html'; var webview = Ti.UI.createWebView({ width:'100%', height:'100%', url:webUrl }); win.add(presWebView)
Although the page opens correctly in the web view, all image URLs do not work.
<image src="appdata:///image.jpg"/> <image src="app:///image.jpg"/> <image src="file:///image.jpg"/> <image src="appdata://image.jpg"/> <image src="app://image.jpg"/> <image src="app://image.jpg"/>
this problem also applies to links, no matter how I try to link to them, web browsing tells me that the page does not exit.
source share