Questions tagged [android-clipboardmanager]
7 questions
4
votes
0 answers
ClipboardManager sometimes does not pick up clipboard content
I have been experiencing some weird behavior. My app randomly fails to detect/pick up clipboard content (other apps do detect and paste it correctly). I am following these guidelines.
My code looks like this.
public class ClipboardProvider {
…

acrespo
- 1,134
- 1
- 10
- 33
2
votes
0 answers
ClipboardManager crashing entire emulator
I'm was testing ClipboardManager to copy a String to the device's clipboard when clicking a button. I started spam clicking the button to test it and it ended up crashing my emulator.
//In my activity
@OnClick(R.id.btn_copy_address)
void…

DIRTY DAVE
- 2,523
- 2
- 20
- 83
2
votes
1 answer
How to remove OnPrimaryClipChangedListener of ClipboardManager in Kotlin?
I use the following code to monitor the change of clipboard, I hope to remove the monitor when I finish the operation.
But clipboard.removePrimaryClipChangedListener { } required to pass parameters, how can I do?
Code
btnMonitor.setOnClickListener…

HelloCW
- 843
- 22
- 125
- 310
1
vote
1 answer
Is there any possibility to paste content of clipboard in Home Screen Widget for android 10?
I am trying to create a widget which takes an input of serial key from users.
I also added a paste button for convenience because serial key is 14 digits long. Below code was working fine for devices before android 10
ClipboardManager clipboard =…

Deep Dave
- 159
- 1
- 8
0
votes
1 answer
Is Copy to clipboard when app in background restricted in android?
I was trying to copy to the clipboard when the app is closed, But it did not copy anything to the clipboard.
I saw that android 10 restricted the access to the clipboard data to read in the background, is writing to the clipboard also…

Manoj ahirwar
- 1,062
- 1
- 10
- 24
0
votes
1 answer
How come items I put on the clipboard don't show up on the SwiftKey clipboard history?
I'm using this code to put items on the clipboard and it works fine, apps can paste what I put there just fine, but SwiftKey never shows on their history what I put on the clipboard. What am I doing wrong?
ClipboardManager clipboard =…

casolorz
- 8,486
- 19
- 93
- 200
0
votes
2 answers
How to copy a value to clipboard
I am currently trying to include a copy to clipboard function for my app. My app is a barcode scanner that produces 2 buttons upon the successful scanning of a barcode/QR code. The 2 buttons are "visit" and "ok", i would like to add an extra button…

Moh Nab
- 19
- 1
- 6