I am working on an e-book reader application, and I need to implement a highlight and highlight function, for example, implemented in Amazon-kindle, kobo, moon + reader, etc.
I tried using WebView, since we can select text in 2.3 and later versions of Android OS with a long touch. I do not get the window.getSelection () object, so my JavaScript does not highlight the text.
This is possible because other applications have implemented this feature.
Does anyone know how to do this? Is there a special API that I need to use?

android android widget
user320676
source share