I am developing an Android HTML5 application.
I am not using any of the Android API apart from loading my main.html file. The rest of the application runs through HTML5 and jQuery mobile.
I use localstorage in my app to store some user related data. When I test this in my local browser by loading the main.html file everything works well. But when I run the same application on Android simulator I don't see the values in the app which I am loading from localstorage.
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); //
setContentView(R.layout.activity_main);
WebView webView = new WebView(this);
WebSettings settings = webView.getSettings(); // TO enable JS
settings.setJavaScriptEnabled(true); // To enable Localstorage
settings.setDomStorageEnabled(true);
webView. webView.loadUrl("file:///android_asset/main.html");
setContentView(webView);
}
So my ultimate question whether a standalone android HTML 5 app supports localstorage or not?
If not what is the alternative apart from data storage?