Unable to find the good folder for the assets files

I am trying to work with the tutorial about Webviewer using Javascript that has an usual
IF debugmode
use "Folder x"
use "folder y"
files folders
this is also shown in this topic.

However, either on debug mode or not I cannot access these files.
I always get "file not found " message.
Apparently my new Samsung A40 stores files differently than my previous mobiles.
But it is quite difficult to know what are the actual folders.
any idea?

Let us check where you are storing your file JavascriptProcessor.html.

Is this in your assets / Media ?

development path should be:


compiled app path should be:


(you have an s on the end of android_asset)

other option is writing
file:///storage/emulated/0/folder_path for a file on internal storage and
file:///storage/emulated/sdcard/folder_path for file on SD card.


or this


needs file:// tacked on the front :slight_smile:


for whatever reason ...

The webviewer requires a fully qualified url: http or https or file, for example.

... to complete this, these also seem to work:



Btw, I would like to see the Java code to see how to get this:

The left paths work, the ones on the right (of course) don't.

1 Like

As written in documentation a file: URL is considered as local file URL but it is nowhere written that it should start with file:/ , file:// or file:///.
But it is recommended to use three slashes.(where path does not start with /)

1 Like

So what's your conclusion from this?

I ask, since you have a lot of experience with the WebViewer, because you have created an excellent CustomWebView extension.

Thank you for all your responses.
Actually I tried this mtn/sdcard but it did not work.
I used the /storage/emulated/0/file_path and it worked on debug mode.
thanks for that.
the other part seems to work as well.

Any url starting from file: is considered a local file url.
These all work:

However there is an exception. This will not work:


Same as what you have posted above.

Yes, but I cannot find out why these URLs (paths) are accepted or adapted so that you always get:
file: ///...

See here: https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/WebViewer.java


or in your CustomWebView extension:


yesterday, I downloaded the HTML.aia from Taifun page and import it to appinventor and it was working great! it contains the following path:


Today I start to work on my project but this path not working any way!
I returned back to Taifun file and tried to run it but not working also! and I tried all possible paths described on this post and on other resources but no way!

I tried all paths here:

but the following path worked for me when I built .apk and install it on my mobile!

could any one help me please?

Thank you in advance!

for devices >= Android 10 the assets for the companion app are now stored in the ASD
in the webviewer you also can use the path http://localhost/hello.html now, which works in the companion app as well as after building


Hi Taifun, Thank you for your assistance!
I already tried "http://localhost/hello.html" but no way!
check this here please

(external image uploaded into this thread by Taifun)

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

..... and is hello.html stored in the ASD?