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.
- ClearClipboard
- Clears the clipboard content by overwriting it with multiple large strings, followed by an empty string.
- ClipboardCleared
- Event triggered when the clipboard is successfully cleared.
- GetClipboardContent
- Retrieves and returns the current text content of the clipboard.
- SetClipboardContent
- Parameter:
String text
- Sets the provided text as the clipboard content.
- Parameter:
- ClipboardContentSet
- Event triggered after setting the clipboard content.
- IsClipboardEmpty
- Checks and returns whether the clipboard is empty.
- ClearClipboardCompletely
- Clears the clipboard content completely and triggers an event.
- AddToClipboard
- Parameter:
String text
- Adds the provided text to the existing clipboard content.
- Parameter:
- GetClipboardItemCount
- Retrieves and returns the number of items in the clipboard.
- SaveClipboardContent
- Saves the current clipboard content for later restoration.
- RestoreClipboardContent
- Restores the previously saved clipboard content.
- StartClipboardMonitoring
- Starts monitoring clipboard changes and triggers an event on content change.
- StopClipboardMonitoring
- Stops monitoring clipboard changes.
- ClipboardContentChanged
- Event triggered when the clipboard content changes.
- ClearSavedClipboardContent
- Clears the saved clipboard content.
- ConvertClipboardToPlainText
- Converts the clipboard content to plain text and returns it.
- ConvertTextToClipboard
- Parameter:
String text
- Converts the provided text to clipboard content and triggers an event.
- Parameter:
- ClipboardContentConverted
- Event triggered after converting text to clipboard content.
- GetClipboardTextAndHtml
- Retrieves and returns both the text and HTML content of the clipboard as a list.
- SetClipboardContentWithLimit
- Parameters:
String text
,int maxLength
- Sets the provided text as the clipboard content, truncated to the specified maximum length.
- Parameters:
- IsClipDataSupported
- Checks and returns whether
ClipData
is supported on the device.
- Checks and returns whether
- HandlePermissionResponse
- Parameters:
String permission
,boolean granted
- Handles the response to a permission request, indicating whether the permission was granted or not.
- Parameters:
Example video:
aia project:
ClearClipboardTest.aia (22.7 KB)
Extension:
JoeDevClearClipboard.aix (12.7 KB)
Thanks.