Regex Rookie Regex Rookie - 10 months ago 47
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?


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() : "";