1.click on the file it may open your browser.
2.Install Acode app from Play Store.
3.install termux and go to your file. By cd /storage/enumerated/0/Your_file
If you want to view a local HTML file on your Android device using Chrome, you might encounter some difficulties. Chrome does not allow you to open local files by default, so you need to find a workaround. In this blog post, I will show you two possible ways to load a HTML file in Chrome on Android.
The first way is to use a file manager app that has a built-in browser. For example, you can use Acode, which is a code editor and web IDE app that you can download from the Play Store. Acode lets you create, edit and view HTML files on your device. To load a HTML file in Chrome using Acode, follow these steps:
- Open Acode and tap on the folder icon at the top left corner.
- Navigate to the folder where your HTML file is located and tap on it.
- Tap on the three dots icon at the top right corner and select "Open with".
- Choose "Chrome" from the list of apps.
The second way is to use a terminal emulator app that can access your device's storage. For example, you can use Termux, which is a powerful terminal app that you can download from the Play Store. Termux lets you run Linux commands and install packages on your device. To load a HTML file in Chrome using Termux, follow these steps:
- Open Termux and type `termux-setup-storage` to grant access to your device's storage.
- Type `cd /storage/emulated/0/Your_file` to change the directory to where your HTML file is located. Replace `Your_file` with the name of your file.
- Type `python -m http.server 8000` to start a simple web server on port 8000.
- Open Chrome and type `localhost:8000` in the address bar.
These are two ways to load a HTML file in Chrome on Android. I hope you find them useful and easy to follow. If you have any questions or feedback, please leave a comment below. Thank you for reading!
No comments:
Post a Comment