The Android Clipboard-Service allows you just to add text or other items into the clipboard, where on most Android devices the Clipdata items will be inserted into a stack with undefined max number of content. My problem is the following: I have a password manager app which can insert a chosen password into the clipboard but because passwords are highly sensitive data I would like to remove an inserted password after the defined timeout has passed. So my question is the following: Is it somehow possible to get an advanced access to the Clipboard entries and modify it somehow? I know that the framework itself does not allow that but is there a hacky way to do it?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
The "stack" is of size 1. There is one system clipboard entry per user. See, for example, the Android 8.1 system service that implements the clipboard. Each
PerUserClipboard
holds a singleClipData
, not a stack.It is possible that third-party apps offer some sort of clipboard extender, and it is possible that device manufacturers or custom ROM developers might modify how Android handles the clipboard. However, those go beyond the scope of the OS itself.
You would need to ask the developer of whatever is offering this extended clipboard capability. Perhaps they have an API that you can use.
You can set the current clipboard entry using
ClipboardManager
; on Android 9.0+, you can clear the current clipboard entry usingClipboardManager
as well. Both will affect the current user... but only for the single-entry system clipboard.