Currently the development-if-true path is file:///mnt/sdcard/AppInventor/assets/{filename}.html and the development-if-false path is file:///android_asset/{filename}.html
Three questions:
What is the path I should be using to access the thunkable files (rather than appinventor files) in development-is-true mode?
What development-is-false path should I use for ios devices?
How do I discover a device’s operating system (android or ios) so the app knows which path to use to get the html file?
I have the html file saved in the asset files, I just can’t get my webviewer to access it. That’s how I had it working in AppInventor2, but I think I hear you saying that it doesn’t work in Thunkable that way.
Instead, I need to include the code directly in the webviewer url with the “data:text/html,” added to the front. It is working in that I see the html code’s background color changing, but my included javascript isn’t showing up. (I have a script that accesses a blogspot rss feed.) Your example shows a script separated but joined to the rest of the html. Is this necessary? I can’t view all your code, and unsure what I need to do for the URL to read the included javascript. Thanks again!
As you correctly say, there are 2 ways to add html to the project - as a loaded html file and via the data: protocol. When using “data: text / html” in many cases, the code will not work or will only work partially. If your html uses jQuery, Framework7, Processing.js and other frameworks, then with high probability this code will not work through “data: text / html”. Therefore, there is only a way to load these files into the project as assets, and in WebViewer.URL you specify the name of the downloaded file - prayerwall-2.html.