Hello,
I am trying to work with the tutorial about Webviewer using Javascript that has an usual
IF debugmode
use "Folder x"
else
use "folder y"
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?
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.
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 /)
Hi,
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.
Thanks
Hello..
yesterday, I downloaded the HTML.aia from Taifun page and import it to appinventor and it was working great! it contains the following path:
file:///mnt/sdcard/AppInventor/assets/hello.html
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:
file:///storage/emulated/0/assets/hello.html
file:///storage/emulated/0/AppInventor/assets/hello.html
file:\\storage/emulated/0/AppInventor/assets/hello.html
but the following path worked for me when I built .apk and install it on my mobile!
file:///android_asset/hello.html
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
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.