Custom HTML On Webviewer [SOLVED]

I trying open custom html on app assets

on companion working but when decompile app webviewer is blank
blocks

Can you show the the Path To Assets return and the value of the WebViewer.URL after loading the page in the compiled app?

on companion return: file:///mnt/sdcard/AppInventor/assets/index.html

on app file:///android_asset/index.html edit: about:blank

and my app dont request storage permission

2 Likes

help need :slight_smile:

customer waiting me

I’ll test to see if it’s working for me in an hour or two.

1 Like

@Yusuf_Deniz Bunu veya kısaca cihazın içinde bulunan dosyayı PathToAssets kullanmadan text olarak yazsan çalışmıyor mu?

@Yusuf_Deniz this Will Absolutly help you to View Custom (Local) Html file in your WebViewer Component

Blocks

Thanks!

@Yusuf_Deniz It works for me in the compiled app with this url file:///android_asset/file.html

does your html page use any JavaScript libraries or CSS files?
if yes, did you upload these files also into the assets of your app?
Taifun

1 Like

Yes, that may be the case with him.

Yok çalışmıyor

Thanks for reply but my html have css and .js files

I added all files

I will try again

@Yusuf_Deniz Ne dedim ben sana :wink:

:smiley: çözüldüğünü sanmışım companionda çalıştırdığımdaki dosyaları kullanıyormuş yani başka telefonda hala çalışmıyor

SO STILL NOT WORK XD

First of all, always do a Google Search:


It is not possible to use the webviewer component to pick files in App Inventor.

The webviewer is no full browser and you can’t pick files like this. You will have to use the activity starter for that, see for example How to pick a file from SD card.

Btw. generally you can use style sheets and libraries together with the webviewer, but all files must be in the same directory as the main html file, see some examples here, no subdirectories, but as already said, the webviewer is no full browser and also some CSS or libraries will not help here.

(@Taifun’s answer at Stack Overflow.)

aynısını denedim ama çalışmıyor

can u try this app and tell me if work
TEST.apk (5.0 MB)

Oradaki cevaba göre ulaştığın çözümü buraya atar mısın? Belki oraya karşı hatalı bir şey yapıyorsundur?


on companion i using file:///mnt/sdcard/AppInventor/assets/index.html and working
but on app
file:///mnt/sdcard/AppInventor/assets/index.html and file:///android_asset/index.html
not working

Attığım cevapta açık bir şekilde WebView’ın cihazdan dosya çekemeyeceği yazıyor:

It is not possible to use the webviewer component to pick files in App Inventor.

Buraya bak: App Inventor Tutorials and Examples: Pick a file | Pura Vida Apps

1 Like

yok kullanıcının seçmemesi lazım apkyi deneyebilirmisin

Finally Problem Solved By @pavi2410 Thank You @pavi2410
here a solution

2 Likes