Reputation: 299
In Android API 33, when you copy something to clipboard, a special bar appears:
If the copied data is sensitive, you can set ClipDescription.EXTRA_IS_SENSITIVE to true for the clip:
PersistableBundle persistableBundle = new PersistableBundle();
persistableBundle.putBoolean(ClipDescription.EXTRA_IS_SENSITIVE, true);
clip.getDescription().setExtras(persistableBundle);
As a result, the copied data becomes hidden:
However, when you click the share button on that bar or use the copied text in another app, the text is revealed:
Or
The question is how to hide sensitive data in this scenario?
Upvotes: 0
Views: 623