hi guys
I have been involved in this problem for several days please help me.
My goal is to build a webview page without the need to internet because slow down loading.
this is my method :
First I downloaded the html page with a folder that has the information of that page then I compressed that folder and uploaded it with the html file inside the appinventor.
Then, according to the instructions, I first saved the zipped folder and html file in storage -> Appinventor -> assets , and then I used an extension for extract the zipped folder
but unfortunately it does not work and the app does not load properly.
after building your app the assets folder is read only... your method only works in the companion app...
you should download the zip file to the ASD and unpack it there, see also this guide
another issue is, the webviewer is not able to access the filesystem anymore...
but you could try the extended webviewer extension, see here
but i am iranian And my English language is not very good so I understand what you mean by using asd and custom webview, but I do not know how to use it in this project , if it is possible to send me a block photo that I have to write for this project.
shop.html : html file webpage
shop_files.zip : folder that has the information of that page
blocks1,2 : for save html file and zip file in storage -> Appinventor -> assets
blocks6 : Save the file asd according to the tutorial you said ( Of course, I did not know what to write for the url, so I wrote the test address)
block7 : for read and unzip file in storage -> Appinventor -> assets
Please do my project without considering my codes and send me a picture of it Because I do not know what to do and I do not understand anything from the instructions friends gave, rest assured it won't take you long time.
Thank you very much for doing this
All I want is to display the html of a web page offline
In order to run html in an AI2 webviewer with associated files, images, etc. it may be possible if EVERYTHING is in the SAME directory, and that will mean that all the links in the html files MUST point to that same directory (or in html you would use just the filename). If your "shop" site has files in more than one directory then it probably will not work. The webviewer has issues with accessing the android filesystem, as previously mentioned.
I extracted the file myself as a test and the page came up and now I just need help to extract zip file (shop_files.zip) in STORAGE -> APPINVENTOR -> ASSETS .
Please just guide me for this part and send me a photo of your block post.
well, sorry, I'm not here to do the work for you...
rather than waiting for the solution just follow the previous advice and do the tutorials to learn the basics...
I do not want you complete the my project bad just tell me how to extract my zip (shop_files.zip) file in the address :
storage -> appinventor -> assets
Please just that, I've only been involved in this little thing for a few days
it is not possible to do this because as already mentioned 2 days ago:
after building your app the assets folder is read only... your method only works in the companion app...
therefore the simplest solution for you is to copy everything you need for that webpage into the assets of the app without need to unzip anything...
as most probably these are a lot of files, you get a problem while building the app, therefore as also already mentioned earlier follow this advice
however you have to consider @TIMAI2's advice, too...
hope that helps...
now it is your turn to try something
ok thank you very much for your time , I had two more questions and I promise they will be my last questions
1- If it is not possible to extract the file in the assets folder, then what are these extension for?
com.puravidaapps.TaifunZip.aix
com.KIO4_DecompressFile.aix
2-Well, if we are going to upload css files to the storage->assets one by one, the size of the app will increase and this is not good for a web application ,On the other hand, using the webviwe block that you see in the image below will slow down the app and load it, so what is your suggestion for displaying web pages in a web-based application ؟
It is not possible to write any files to the assets folder in AI2, never has been from the beginning. You can place files in assets (Media Folder) at design time and read from them at runtime, but you cannot change or write to them.
This will all depend on a reliable internet connection. The webviewer does do caching, therefore loading of non changing pages should speed up after first load. I have just run a test, and found that the html file can read an image from a sub directory, therefore it should be possible to retain your website file structure (as long as there are no files in a directory "above" the directory with the html file in it.)
Why not share your zip file, for power users to test?