ClearClipboard - Clipboard Management

This extension provides comprehensive tools for managing the clipboard content on Android devices. It allows users to perform various clipboard operations such as clearing, setting, getting, and monitoring clipboard content.

component_method (4)

  1. ClearClipboard
    • Clears the clipboard content by overwriting it with multiple large strings, followed by an empty string.

  1. ClipboardCleared
    • Event triggered when the clipboard is successfully cleared.

  1. GetClipboardContent
    • Retrieves and returns the current text content of the clipboard.

  1. SetClipboardContent
    • Parameter: String text
    • Sets the provided text as the clipboard content.

  1. ClipboardContentSet
    • Event triggered after setting the clipboard content.

  1. IsClipboardEmpty
    • Checks and returns whether the clipboard is empty.

  1. ClearClipboardCompletely
    • Clears the clipboard content completely and triggers an event.

  1. AddToClipboard
    • Parameter: String text
    • Adds the provided text to the existing clipboard content.

  1. GetClipboardItemCount
    • Retrieves and returns the number of items in the clipboard.

  1. SaveClipboardContent
    • Saves the current clipboard content for later restoration.

  1. RestoreClipboardContent
    • Restores the previously saved clipboard content.

  1. StartClipboardMonitoring
    • Starts monitoring clipboard changes and triggers an event on content change.

  1. StopClipboardMonitoring
    • Stops monitoring clipboard changes.

  1. ClipboardContentChanged
    • Event triggered when the clipboard content changes.

  1. ClearSavedClipboardContent
    • Clears the saved clipboard content.

  1. ConvertClipboardToPlainText
    • Converts the clipboard content to plain text and returns it.

  1. ConvertTextToClipboard
    • Parameter: String text
    • Converts the provided text to clipboard content and triggers an event.

  1. ClipboardContentConverted
    • Event triggered after converting text to clipboard content.

  1. GetClipboardTextAndHtml
    • Retrieves and returns both the text and HTML content of the clipboard as a list.

  1. SetClipboardContentWithLimit
    • Parameters: String text, int maxLength
    • Sets the provided text as the clipboard content, truncated to the specified maximum length.

  1. IsClipDataSupported
    • Checks and returns whether ClipData is supported on the device.

  • HandlePermissionResponse
    • Parameters: String permission, boolean granted
    • Handles the response to a permission request, indicating whether the permission was granted or not.

Example video:

aia project:
ClearClipboardTest.aia (22.7 KB)

JoeDevClearClipboard.aix (12.7 KB)


Looks like a really good extension Joe, but the method ClearClipboard used to clear the clipboard will mean that it's never empty. ClearClipboardCompletely sounds better, I will try it.

Is it limited to specific Android versions?

1 Like

Tested and working, Android 10, single string. (APK)

1 Like

Yes, I was procrastinating for a few days because I couldn't completely delete the clipboard. I think there must be some way to do it, but I couldn't find it, I think you can do it.

I haven't tried it on other devices, but it should work on all of them, tested on Android 11.

Really crazy that Google have left an often used facility insecure.

As it is going, everything is restricting, it won't be long before it does. He is going to make it more difficult for us every time.

But we will find a way.

1 Like