i don't know if you can get value from the javascript of your webview, but this link worth to try:
How to get return value from javascript in webview of android?
after you get your value from js, you can save it on SharedPreferences
anyway SharedPreferences WILL NOT flushed when you closed your application
SharedPreferences WILL delete when you uninstall your application, or clear appplication data (or you manually delete in from your code)
how to save to sharedpreferences:
SharedPreferences prefs = this.getSharedPreferences("keyToAccessSH", Context.MODE_PRIVATE);
SharedPreferences.Editor ed = prefs.edit();
ed.putString("keyToAccessString", value);
ed.commit();
you can call this to get from sharedpreferences:
SharedPreferences prefs = this.getSharedPreferences("keyToAccessSH", Context.MODE_PRIVATE);
String get = prefs.getString("keyToAccessString", null);
//null is default value when keyToAccess not found
hope it's help