I need to programatically trigger text selection mode in a WebView, but the code I have used does not work on Jelly Bean?
I have been using the following code but it
I have listed a potential solution in the comments here: How to enable the default highlight menus in android webview?
Here is the content of the potential solution:
After analyzing android.webkit.WebViewClassic
I have had some success with the following:
KeyEvent enterEvent = new KeyEvent(0,0,KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_ENTER,0,0);
enterEvent.dispatch(this);
I thought more might be required as I needed to scroll down the WebView
a little before the above worked when using an emulator, but after testing on a real JellyBean device the above seems to work fine.