This article mainly introduces the Android WebView how to use the Localstorage method of the relevant information, the need for friends can refer to the
I use HTML5 's Localstorage on Android.
Why can't you read it or not?
A lot of search on the internet has no effect
? mainwebview = (WebView) This.findviewbyid (R.id.mainwebview);
WebSettings settings = Mainwebview.getsettings ();
Settings.setjavascriptenabled (TRUE);
Settings.setallowfileaccess (TRUE);
Settings.setdatabaseenabled (TRUE);
String dir = This.getapplicationcontext (). Getdir ("Database", Context.mode_private). GetPath ();
Settings.setdatabasepath (dir);
Settings.setdomstorageenabled (TRUE);
Settings.setgeolocationenabled (TRUE);
Solution:
?
Mwebview.getsettings (). Setdomstorageenabled (True);
Mwebview.getsettings (). Setappcachemaxsize (1024*1024*8);
String Appcachepath = Getapplicationcontext (). Getcachedir (). GetAbsolutePath ();
Mwebview.getsettings (). Setappcachepath (Appcachepath);
Mwebview.getsettings (). Setallowfileaccess (True);
Mwebview.getsettings (). Setappcacheenabled (True);
This test is okay.