Getting starting index and ending index of selected text
===

Im copying text from webview using the following APIs.

    KeyEvent shiftPressEvent = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SHIFT_LEFT, 0, 0);
    shiftPressEvent.dispatch(webView);

Now i want to get the start index and end index of selected text. Is it possible? Can you guys please help?