

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Android 4.0.1 breaks WebView HTML 5 local storage?
To solve this problem, follow the below-given steps −
For android versions less than 4.4, loading data into a webview with a file scheme as a directory like this won’t work.
browser.loadDataWithBaseUrl("file:///android_asset/", html, "text/html", "UTF-8", null);
Add a filename and it works on older Android versions −
browser.loadDataWithBaseUrl("file:///android_asset/new.html", htmlContent, "text/html", "UTF-8", null);
You can use the following too, in case your URL is http://www.demo.com −
browser.loadDataWithBaseURL("http://www.demo.com", htmlContent, "text/html", "utf-8", null);
- Related Questions & Answers
- How to save cache in local storage of android webview?
- How to save database in local storage of android webview?
- HTML 5 local Storage size limit for sub domains
- HTML DOM Local Storage clear() method
- n-th number with digits in {0, 1, 2, 3, 4, 5} in C++
- Sum of the Series 1/(1*2) + 1/(2*3) + 1/(3*4) + 1/(4*5) + ... in C++\n
- Bootstrap 4 .flex-grow-0|1 class
- Thread-local storage (TLS)
- C++ program to find the sum of the series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + … + (n*n)
- Storing Credentials in Local Storage
- How to load html content in android webview?
- Difference between Session Storage and Local Storage in HTML5
- Sum of the series 1 + (1+3) + (1+3+5) + (1+3+5+7) + + (1+3+5+7+....+(2n-1)) in C++
- Sum of the series 1 + (1+3) + (1+3+5) + (1+3+5+7) + ...... + (1+3+5+7+...+(2n-1)) in C++
- Find the nth term of the given series 0, 0, 2, 1, 4, 2, 6, 3, 8, 4… in C++
Advertisements