Tuesday, April 29, 2014

if you want to use localstorage in Android

this is sigificant to add some line when you make webview


getSettings().setDomStorageEnabled(true);
getSettings().setDatabaseEnabled(true);
if(Build.VERSION.SDK_INT < 19){ // Build.VERSION_CODES.KITKAT = 19
getSettings().setDatabasePath("/data/data/" + getContext().getPackageName() + "/databases/");
}

No comments:

Post a Comment