I have a .html, .js, .css files on SDCARD, in my case html file contents are in encrypted form. I'm loading html file in following steps :
- Read file content
- Decrypt all content
Load all content into webview using below line :
webView.loadDataWithBaseURL(relativePath, decFileContent, "text/html", "utf-8", null );
here
relativePath = "file:///mnt/sdcard/MyFolder/"
What happens?
It loads the decrypted content successfully, however not loading js & css files kept in relativePath folders named with JS/ & CSS/ respectively. It gives the following error dialog
"Sorry! your application not support to local storageError: SECURITY_ERR: DOM Exception 18"
Also, I searched for the above error & possible similar links are 1 & 2 in answers to these questions they have suggested to load js & css from assets folder. In my case I don't want load them from assets, I want to load them from SDCARD. Anybody have an idea how to achieve this?