Custom HTML On Webviewer [SOLVED]

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

but what you can do instead see this answer


Taifun

@TurboProgramming fyi: I just corrected/updated my answer on Stackoverflow… :wink:

If you use html files including js and css files, which use a directory structure, you have 2 options:

  1. upload all files into the assets of your app and modify all paths inside all html, js and css files to use that main directory,
  2. or (probably easier) download your project (aia file) onto your computer, make a backup just in case (you know to have backups is always recommended…) open it using 7zip, drag your complete directory structure inside subdirectory assets, save the modified project (aia file) and upload the modified project to App Inventor

Taifun

1 Like

what if there is an image file in html page how can i link to my html i mean path ?

Use relative path

1 Like

add image link like this in your html file… it will work. I have tested it on my app.

img src="file:///android_asset/imagefile.png"

i have created a browser where index.html file loads from asset folder. i used index.html as a home page for the browser so that a user can view landing page without INTERNET connection.

http://petty.link/pnHkbcd

This post was flagged by the community and is temporarily hidden.

2 posts were split to a new topic: WebViewer is not loading pictures

you need to use taifun extension in order display in apps.