I have a WebView that has a textfield in it, in which the user enters some text. On a button press I want to extract this text from the WebView and store it in a String so that I can use it later in some other native code.
Note: This text entry must be done in a WebView, and cannot be moved to an EditText.
You need to get access to the function behind the button (ie the webview you're accessing has to provide it)
Basically, this post will help you accomplish what you're looking for : https://stackoverflow.com/a/9581016/4232337