How to observe Android's Clipboard, really?

后端 未结 2 1414
你的背包
你的背包 2021-02-11 06:39

I need to detect Android Clipboard\'s content changes, and register the changes, but I can\'t really understand how to achieve such result.

There are a lot of clipboard

相关标签:
2条回答
  • 2021-02-11 07:12

    Since API version 11 ("Android 3.0"), there is a new service and appropriate callback ClipboardManager.OnPrimaryClipChangedListener

    0 讨论(0)
  • 2021-02-11 07:14

    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.

    0 讨论(0)
提交回复
热议问题