I've got a simple Android app that has a WebView. The WebView is set to browse to a site which uses JavaScript's localStorage feature.
I've already got my WebSettings set to allow DomStorage:
webSettings.setJavaScriptEnabled(true);
ebSettings.setDomStorageEnabled(true);
String dbPath = this.getApplicationContext().getDir("database", MODE_PRIVATE).getPath();
webSettings.setDatabasePath(dbPath);
What I need is a way that my Java code can read a variable stored using the localStorage mechanism, ie.:
The JavaScript does this:
var storage = window.localStorage;
storage.setItem("name", "Hello World!");
How can I read the value of "name" from localStorage from Java code?