S swabygw Active Member Licensed User Longtime User May 26, 2017 #1 Following this example here: https://www.b4x.com/android/forum/threads/adding-an-animated-gif-to-your-app.29872/#content I've put the animated GIF in the Files folder of my project, along with an HTML file, called StartupOverlay.html, which has the following code: <html><body><img src="lambda_flat_rotating_black_152x200.gif" /></body></html> The code in B4A looks like: B4X: Dim wv1 As WebView wv1.Initialize("") wv1.LoadURL("file:///android_asset/StartupOverlay.html") StartupOverlayPanel.AddView(wv1, 0, 0, 100%x, 100%y) But getting the error: Webpage not available, The webpage at file:///android_asset/StartupOverlay.html could not be loaded because: net::ERR_FILE_NOT_FOUND[/code] I think I followed the example correctly, but I can't see the error that I must be making.
Following this example here: https://www.b4x.com/android/forum/threads/adding-an-animated-gif-to-your-app.29872/#content I've put the animated GIF in the Files folder of my project, along with an HTML file, called StartupOverlay.html, which has the following code: <html><body><img src="lambda_flat_rotating_black_152x200.gif" /></body></html> The code in B4A looks like: B4X: Dim wv1 As WebView wv1.Initialize("") wv1.LoadURL("file:///android_asset/StartupOverlay.html") StartupOverlayPanel.AddView(wv1, 0, 0, 100%x, 100%y) But getting the error: Webpage not available, The webpage at file:///android_asset/StartupOverlay.html could not be loaded because: net::ERR_FILE_NOT_FOUND[/code] I think I followed the example correctly, but I can't see the error that I must be making.
An Schi Well-Known Member Licensed User May 26, 2017 #2 There is a difference in using assets in debug and release mode. In debug you can use something like 'force assets'. In release mode it should work without that. Which mode do you use? (not sure if this is the solution for your problem....) Upvote 0
There is a difference in using assets in debug and release mode. In debug you can use something like 'force assets'. In release mode it should work without that. Which mode do you use? (not sure if this is the solution for your problem....)
S swabygw Active Member Licensed User Longtime User May 26, 2017 #3 Thanks for the answer, but, actually, I can close this because I'm going to use an HTML file on my webserver instead (and I've got that working okay). Upvote 0
Thanks for the answer, but, actually, I can close this because I'm going to use an HTML file on my webserver instead (and I've got that working okay).
S swabygw Active Member Licensed User Longtime User May 27, 2017 #4 As a follow-up, though - I did try it in Release mode and it worked correctly. And... #DebuggerForceStandardAssets: True ...got it to work in Debug mode. Upvote 0
As a follow-up, though - I did try it in Release mode and it worked correctly. And... #DebuggerForceStandardAssets: True ...got it to work in Debug mode.
An Schi Well-Known Member Licensed User May 27, 2017 #5 Thx for bringing the correct term, which i was too lazy for Upvote 0