PS: itself is. NET birth because the project needs to study several days of Android This method online also have their own also write to have time to see themselves and to the friends who have not solved the problem, the following is a key to allow the use of localstorage
This can only be used Localstorage is currently studying how to use it to store in the app and so on.
protected void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
//Instantiation ofWebViewObject
WebView =New WebView (this);
//Set upWebViewproperty that can performJavascriptScript
Webview.getsettings (). setjavascriptenabled (true);
Webview.getsettings (). setdomstorageenabled (true);//Focus
String Appcachepath = Getapplicationcontext (). Getcachedir (). GetAbsolutePath ();
Webview.getsettings (). Setappcachepath (Appcachepath);
Webview.getsettings (). Setallowfileaccess (true);
Webview.getsettings (). setappcacheenabled (true);
JsPop
Webview.setwebchromeclient (New Webchromeclient ());
try {
//Set the address of an open page
Webview.loadurl ("http://192.168.16.39:8901/");
Webview.setwebviewclient (New Webviewclient () {
Public Boolean shouldoverrideurlloading (WebView view, String URL) {
// Override this method to indicate that clicking on a link in the Web page or jumping in the current WebView does not jump to the browser
View.loadurl (URL);
return true;
}
});
}
catch (Exception ex)
{
Ex.printstacktrace ();
}
Setcontentview (webview);}
Android using Localstorage