Regex Rookie Regex Rookie - 1 year ago 95
Android Question

Clipboard hook to Android's stock web broswer

Do you know of any way to hook to Android's stock web browser, so that I can select, copy & paste a web page content programmatically?

Answer Source

Selected text in stock Android Browser is copied to ClipBoard. Use ClipBoardManager to get the copied text (like below).

 ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 
 String text = clipboard.hasText() ? clipboard.getText().toString() : "";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download