I am loading the url on the WebView which is a login page. Once user enters username, password and hits the Login button, i want to fetch the username. I looked at the solutions in SO, but those are showing to edit the html but it is not possible in my case. In iOS i am getting username by the following piece of code
NSString* usernameValue = [ webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('username').value"];
Below is my android code
WebView view = (WebView) this.findViewById(R.id.webView);
view.loadUrl("http://testing/irednew/src/index.php/welcome");
view.getSettings().setJavaScriptEnabled(true);
view.getSettings().setDomStorageEnabled(true);
How to get the username in Android WebView?