How To Copy To And Run An Html5 File Present In An Android Phone's Memory?
I am developing an android application, that should open html 5 file when it launches. What I did was I saved the complete html application under android Assets folder. I am not
Solution 1:
First, use file:///android_asset/mobile/index.html
instead. While the directory on the filesystem is assets/
(plural), the URL format uses asset
(singular).
Second, you cannot open a Web browser on one of your assets. You will need to either:
Copy the files to external storage and launch the default browser on them
Copy the files to internal storage, create a
ContentProvider
to serve them, and launch the default browser on the resultingcontent://
path
This sample project demonstrates the second approach, albeit using a single PDF file than a directory of assets.
A third possibility is for you to display the contents yourself using a WebView
widget.
Post a Comment for "How To Copy To And Run An Html5 File Present In An Android Phone's Memory?"