As far as I know, WebView
handles text selection internally and does not provide any listeners regarding this.
The selection is updated when user moves the cursor on the web page. One possible way to achieve your goal, is to call WebViewClassic.getSelection()
whenever user moves the cursor during text selection. Since this is not a public API, you may need to utilize Java Reflection.
So you may also need to override onTouchEvent()
, in your App to decide whether user has entered selection mode and especially when s/he moves the cursor. If yes, calling WebViewClassic.getSelection()
will result in a string of what has been selected.