Alessandro71 Well-Known Member Licensed User Longtime User Aug 18, 2020 #1 While porting an app from B4A to B4i I stumbled on the following issue: I have an HTML file in the asset folder, which loads an image from the asset folder itself as follows: HTML: Copy <img src="file:///android_asset/add.png" alt=""> Is it still possible under iOS? Which is the correct path? The issue is applied to B4J also
While porting an app from B4A to B4i I stumbled on the following issue: I have an HTML file in the asset folder, which loads an image from the asset folder itself as follows: HTML: Copy <img src="file:///android_asset/add.png" alt=""> Is it still possible under iOS? Which is the correct path? The issue is applied to B4J also
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2020 #2 Never use android_asset. Always use XUI.FileURI. Upvote 0
Alessandro71 Well-Known Member Licensed User Longtime User Aug 18, 2020 #3 Erel said: Never use android_asset. Always use XUI.FileURI. Click to expand... The HTML file is static and preloaded in the asset folder. Would the correct way be to copy it to a real folder and populate path at runtime? Upvote 0
Erel said: Never use android_asset. Always use XUI.FileURI. Click to expand... The HTML file is static and preloaded in the asset folder. Would the correct way be to copy it to a real folder and populate path at runtime?
Erel B4X founder Staff member Licensed User Longtime User Aug 19, 2020 #4 See this post: https://www.b4x.com/android/forum/threads/b4x-use-webview-to-show-large-images.102910/#content Upvote 0
See this post: https://www.b4x.com/android/forum/threads/b4x-use-webview-to-show-large-images.102910/#content
Alessandro71 Well-Known Member Licensed User Longtime User Aug 19, 2020 #5 I solved loading the HTML file into a string and replacing a path placeholder with the path for the relevant platform Upvote 0
I solved loading the HTML file into a string and replacing a path placeholder with the path for the relevant platform
Semen Matusovskiy Well-Known Member Licensed User Aug 19, 2020 #6 I thought that for HTML is typical relative path, not absolute. Upvote 0
Alessandro71 Well-Known Member Licensed User Longtime User Aug 19, 2020 #7 you can use either absolute (i.e. http://host/path) or relative (i.e. /path) links Upvote 0