Webview path error

Hi.

Until some time ago everithing worked fine.
In webview i load a Index.html with the path
file:///mnt/sdcard/AppInventor/assets/
but now when testing with companion give the error net::ERR_FILE_NOT_FOUND

When in production the path
file:///android_asset/
Works fine.

Any idea?

Thanks.

Try the path http://localhost
Taifun

2 Likes

Hi.
No, net::ERR_OCNNECTION_REFUSED

:frowning:

can you please show your blocks to avoid misunderstandings…
Taifun

block

Always Worked…before :slight_smile:

you did not follow the suggestion…

in your case

http://localhost/index.html

Taifun

Go through the link below. It might help you.

WebViewer → Path to the assets on all Android versions (Companion & APK):

2 Likes

This is not implemented as of yet in Kodular. It’s on my radar

3 Likes

not working. I have in my phone android10.

Hi.
Where is the block call get ASD1.appspecificdirectory??
And sdk version? just can find android version.

thanks

But you can also use this:

grafik

Hi, thanks for reply.
So, there is no inmediate solution without install an extension?
Well install an extension just for test porposes … :wink: if there is no other way, i will try it.

By now, why the icon works if is an asset also?

Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Now the file name/path is so chaos and confusing,

In File component, the path is like this:
aa.txt for private dir, //aa.txt for assets, /aa.txt for from sdcard,
(May be we can add a ‘#/aa.txt’ for ASD later)
This is good for users, but for Web component:


(photo taken from Anke’s post)

Why the user have to check if it’s in companion or sdkVersion? all theses checking should be done inside the component. and the user only need to give the url a string like “//index.html” for loading html from asset.

Kodular staff, please make the Web (and other components need to read/write) using the same phylosophy with File component.

This suggestion is also for the extension developers.

2 Likes

This change will land with the next update when available

You can now use http://localhost/ prefix to access any file in assets on both compiled app and companion.

4 Likes