user3634770
user3634770

Reputation: 241

How can I get entered text from Android WebView and use it in my code

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.

Upvotes: 1

Views: 2110

Answers (1)

NSimon
NSimon

Reputation: 5287

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

Upvotes: 1

Related Questions