Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear ALL clipboard entries

On my Samsung Tab 3 running Android 4.1.2 multiple copies to clipboard produce a clipboard containing each copy. This is seen through a button on the tight bottom of the slide-up keyboard.

I'd like to delete all these copies programmatically, however, the ClipboardManager doesn't appear to offer methods to do this. How can delete everything that has been copied to the clipboard?

Thanks,

Chris

like image 209
user3594510 Avatar asked May 01 '14 23:05

user3594510


1 Answers

ClipboardManager clipService = (ClipboardManager)activity.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clipData = ClipData.newPlainText("", "");
clipService.setPrimaryClip(clipData);

like image 128
Mergu. Avatar answered Oct 19 '22 23:10

Mergu.