Each WebView will have it's own JavaScript context and not share variables with any other WebView. If you want to transfer the value of these variables between WebViews then you'll need to write some code, probably something like this:
- Add a JavaScript interface to WebView1 which you can call from JavaScript to get the value of the variable in Java. See http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)
- Pass the value into WebView2 using loadUrl with a
javascript:
URL.
Hope this helps.