Listener for clipboard content change?

泪湿孤枕 提交于 2019-12-03 05:58:45

I think you're looking for ClipboardManager.addPrimaryClipChangedListener().

Edit - this is for Android 3.0, and I don't see any other clipboard-related apis in the earlier levels.

Also see the ClipboardManager docs in the copy and paste guide.

If you are using Android 3.0 you can add a listener with ClipboardManager.addPrimaryClipChangedListener().

I need the exact same functionality. For the moment I'm solving this with android.text.ClipboardManager and a java Timer that checks every second if the clipboard-text has changed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!