Difference between ways of loading html files to WebViewer

Hi, I am working on the FireBase Authenticator tutorial, and I had an error while trying to load my html file FirebaseAuthenticator.html with the path file:///mnt/sdcard/Appinventor/assets/FirebaseAuthenticator.html and it didn't work. I looked back on related forums to try different solutions, but only the localhost one worked. I am working on an Android emulator.

Screenshot 2023-03-08 001221
Screenshot 2023-03-08 001303

When this didn't work, I then switched to file:///storage/emulated/0/AppInventor/assets/FirebaseAuthenticator.html, but it still gave me the same error (file not found) as pictured above.

Screenshot 2023-03-08 002009

Finally, I tried http://localhost/FirebaseAuthenticator.html and my app finally ran.

I was wondering why my original two attempts didn't work (the mnt one and the storage/emulated one), when it worked for a lot of other people. Is there something wrong with my setup and how do I fix it? How can I use these two in the future? What is the difference between these two and the localhost?

Thank you!

If you are loading html from assets, use the url http://localhost/your.html, this works in companion and apk.

Android keeps changing from version to version.

If you got the sample here, please post the link so we can update it.

See also discussion here:

I just read through the linked discussion. I will just use http://localhost/~ in the future. Thank you for all of your explanations!