I need to retrieve image copied from webside in native, built-in android web browser. I am wondering what kind of mechanism is used for CopyPaste operations in built-in applications, because it is not "standard" clipboard. Eg. After copying image in browser (copied into clipboard toast is displayed), when pasting into new SMS i can browse "clipboard" content and pick the one I would like to paste. Content can be text, link and image.
In my approach I am using clipboard listener in background service
listener = new ClipboardManager.OnPrimaryClipChangedListener() {
@Override
public void onPrimaryClipChanged() {
Log.d(LOG_TAG, "Clipboard content changed");
processClipboardContent();
}
};
manager.addPrimaryClipChangedListener(listener); // ClipboardManager
This works fine for text content copied into the clipboard. However this listener is not notified when copying images in browser. Im using Samsung Galaxy S5 for testing. Any ideas how to retrieve content (probabli URI's) copied in build-in browser?