I uploaded it to app.[quote="ChrisWard, post:20, topic:13172, full:true"]
..... and is hello.html stored in the ASD?
[/quote]
your blocks look fine assuming you uploaded a file hello.html
into the media section of the project...
this is the correct way to use the webviewer to access files stored in the assets of the app...
which error message do you get?
EDIT: and which Android version are you using for your tests? do you get issues only in the companion app or also after building the project?
Taifun
I now updated my snippet
and it worked fine for me in the companion app running on Samsung Galaxy A51 (Android 11)
HTML.aia (10.4 KB)
Taifun
it looks like you are using an emulator...
so probably it is an emulator issue?
did you try the companion on an Android device?
Taifun
PS: next time please add screenshots directly into the thread rather than using an external service. Thank you.
Hello Essamy
As per Taifun's comment, use the Companion (or build an APK) and test on your device (phone). The emulator is there to just check small things such as the results of an equation etc - there are many features found in a smartphone that the emulator does not support.
However, if your App does not work on your phone:
- Make sure you have not made a typo in the path or name of the file
- There could be something wrong within 'hello.html' itself.
The path to the assets for Companion on devices with Android ≥ 10 (≥ API 29) is:
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/assets/
The path to the assets for Companion on devices with Android < 10 (< API 29) is:
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/AppInventor/assets/
Thank you Taifun!
I tried it and it worked on companion app running on Huawei P Smart..
but not working on emulator. please see attached images.!
I think it is emulator issue as you said.
Thank you.
blocks1|690x85