
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
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 Articles
- 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
- How to load html content in android webview?
- Thread-local storage (TLS)
- Storing Credentials in Local Storage
- Following data gives the number of children in 41 families:$1, 2, 6, 5, 1, 5, 1, 3, 2, 6, 2, 3, 4, 2, 0, 0, 4, 4, 3, 2, 2, 0, 0, 1, 2, 2, 4, 3, 2, 1, 0, 5, 1, 2, 4, 3, 4, 1, 6, 2, 2.$Represent it in the form of a frequency distribution.
- Difference between Session Storage and Local Storage in HTML5
- Difference between Local Storage, Session Storage, and Cookies in JavaScript
- How to detect click on HTML button through javascript in Android WebView?
- Name the type of quadrilateral formed, if any, by the following points, and give reasons for your answer.(i) $(-1, -2), (1, 0), (-1, 2), (-3, 0)$(ii) $(-3, 5), (3, 1), (0, 3), (-1, -4)$(iii) $(4, 5), (7, 6), (4, 3), (1, 2)$
- Trick to store credentials in local storage
- Retrieve element from local storage in JavaScript?
- Name the property used in the following:$-\frac{4}{5}+0=0+(-\frac{4}{5})=-\frac{4}{5}$

Advertisements