I am trying to read files from internal memory and asset files using webviewer but dont work

my index html are in asset and my css and javascript code are in the internal memory, i am using the file taifun and asset but only read the html and this is in the assets and dont read the css and js that are in internal memory how can make to work that?

the boton to make this is the boton2 that i cant get to read hybrid mode using internal memory and asset using the home url.

jsreader(1).aia (36.3 KB)

you can copy the html and css and js code to ASD folder, in same folder, then load the html from there.

1 Like

but i like to combine assets with external files calling only external files like css and js from html asset added inside my app. using the asd can make that?

Simply, your html,css,js files must all be in the same folder/location, or at least in the same "tree" and referenced by relative file paths. The webviewer and html files therein, in general terms, do not really understand the android file system.

I like to avoid having too many file loads - I have the CSS and JavaScript code within the HTML file, linking only the CSS source as a separate file (from my own server).

when i use the html using external call not using assets are working correctly but combining not call correctly. where is the error in my blocks? you can see that i get the files in download/images but the asset html dont get the files. i am thinking thats is working in different trees but i cant understand how connect two differents routes

maybe can help me with an example how connect different routes?

Again, not the same "tree" at all:

image

image

Why would you do this? The files must all be in the same accessible location/folder (assets, ASD, PrivateDir, /Download or /Documents). Additionally, these files in /Download or /Documents must have been created by the app. Otherwise they will not be accessible on Android 11+.

See here:

because i need to use the assets html css js and the other files like images sounds videos in file taifun call. to reduce the size only loading the code in asset and the other data external calling using taifun file

i know that taifun file and file component are not the same. but how can make to comunicate between both parts?. or its impossible and i need to use only one?. could you clarify me this?

We keep telling you that all the files need to be correctly referenced with relative paths in the html file. This is easier if all the files you need are in the same location.

Focus on getting all your required files into the same location, then load the html file.

all the files is inside download/images, but i add to the asset the index.html, but i dont know how can make to the asset connect correctly because in my html code the route read the routes inside the same file of index.html so the problem is the bad comunication between the index.html asset and the taifun file. in my blocks the route of taifun directory are correctly. but the asset dont work with taifun files. i am reading the hints but i cant understand exactly how comunicate between taifun files and the asset store.

  • You need to copy your index.html file from assets to /Download/Images then load that version of the file to your webviewer.

file:///storage/emulated/0/Download/images/index.html

  • assumes the other files you need are in /Download/Images and you have the correct relative paths in your html file that call on the required files.

but i would like to make a hybrid call using asset files and file taifun. the html file inside download/images works fine using only taifun file. but only using the index.html in assets and calling the failes using taifun files dont work. why i would like to separate html js and css in assets and the other files separately? because my app is big. thanks a lot for help

As we have said, again and again (and not saying it again!), all the files, including the html file, need to be in the same physical location.

The size of you app should not make any difference if you have to copy a file from assets to another location.