How to install a file under data/data/myapp/files folder?
I tried to put my file, say like, index.html under assets, but it was converted to a raw binary file with unreadable file name, however, I wanted to have that index.ht开发者_运维问答ml intact deployed under app/files folder, what should I do?
Thanks.
Step #1: Create a File
object via new File(getFilesDir(), "index.html")
Step #2: See if the File
exists using exists()
Step #3: If the File
does not exist, copy it from your assets using standard Java I/O
精彩评论