1

I want to trigger something as soon as the user copies a text in his phone.

I was using ClipboardManager to get clipboard text at regular intervals to detect any change. I needed the clipboard text anyway.

However, this is not what I aimed to do.

What I actually want:

To trigger something even if the user copies the same text again. Thus, the clipboard content remains same, but the user did manually copy some text from his perspective.

Edit:

Turns out that OnPrimaryClipChangedListener has the same problem. It listens to any change in clipboard, and fails if user copies the same text.

Sayan Sil
  • 5,799
  • 3
  • 17
  • 32
  • I think this is the answer. [Enter link description here](https://stackoverflow.com/questions/24697236/android-how-to-detect-copy-event-of-edittext-in-android) – AOK Nov 12 '17 at 04:33
  • Actually, I tried using the OnPrimaryClipChangedListener already as i wrote in the question. Same issue. It only detects "change". And not whether the user copies something recently or not. – Sayan Sil Nov 12 '17 at 04:37

0 Answers0