How to observe Android's Clipboard, really?
I need to detect Android Clipboard's content changes, and register the changes, but I can't really understand how to ac开发者_运维知识库hieve such result.
There are a lot of clipboard managers around, but I found none open source, and it's difficult to believe they work by checking the clipboard every 15 seconds.
Is there a good method to observe clipboard changes ?
Thanks in advance !
Since API version 11 ("Android 3.0"), there is a new service and appropriate callback ClipboardManager.OnPrimaryClipChangedListener
According to this thread, at least for the Clipper program, they do indeed poll the clipboard - every 5 seconds. There doesn't seem to be anything in the API to do it any other way.
精彩评论