I am developing web browser using webview. (Android API level 21)
My goal is when user copy certain text in webView, getting that text value and change it.
I used clipboard change event listner, so when event listener capture copy event, getPrimaryClip, change clip data and setPrimaryClip are processing.
But, event listener is still alive so after setPrimaryClip is called, this process is called again and again...
How can I control just one time?
Or Could you suggest other event listener?
Edit I referenced this -> made custom contextual action bar.
And with JavaScript code taught by DevTest(answer for this question), I success to make my goal.