Questions tagged [clipboardmanager]

ClipboardManager is an Android service that is responsible for system-wide clipboard management.

126 questions
1
vote
1 answer

clipboard manager extension for writer

I am trying to build a clipboard manager extension for Libre office. When-ever I cut (or copy) text from a document, it should be appended to another file so that I will never loose my work even if I forget to paste it somewhere. Is it possible in…
shantanuo
  • 31,689
  • 78
  • 245
  • 403
1
vote
2 answers

Unable to get the clipboard data in java android

I am working on a android project in java where i need to copy paste some data in an activity, but the problem here is i am able to set the primary clip but when i try to access the primaryClip it returns false. Im setting the Primary clip using the…
Mahesh Gouda
  • 118
  • 9
1
vote
0 answers

Android 12, ClipboardManager.getClassificationStatus always return CLASSIFICATION_NOT_COMPLETE [1]

I use ClipboardManager.primaryClipDescription.getConfidenceScore(TextClassifier.TYPE_URL) every call returns java.lang.IllegalStateException: Classification not complete. How to get the probability of data from the clipboard?
1
vote
1 answer

Android development: How to listen to clipboard changes outside of an APP on Android 11?

I have a personal APP primarily developed for Android 9 that listens to clipboard changes and prompt a window on top of wherever I copy a URL. The implementation is as below: ClipboardManager.OnPrimaryClipChangedListener listener = () -> { …
1
vote
1 answer

Clipboard in Android 10 is not Working as expected

I've implemented a copy from clipboard feature. So, whenever user copies something and my app is resumed after that I show a Snackbar to perform some action. It is working fine in Android 9 but in Android 10 as per policy changes it is not observing…
Usman Rana
  • 2,067
  • 1
  • 21
  • 32
1
vote
0 answers

Is there a way to access to Samsung's clipboard content programmatically?

As we know, Samsung's devices have their own clipboard that stores all the data you copy or your screenshots. I want to manage and delete the content programmatically, I tried to use the ClipboardManager API but it does not provide me a way to…
fesave
  • 181
  • 13
1
vote
1 answer

How to get the value of data copied to clipboard and set it to another value in android studio

I would like to know how I can be able to change the value of a specific data copied into my clipboard to my own set value. So for instance, if the application notices that a phone number had been copied into clipboard, it could then change it to a…
ODAFE
  • 11
  • 3
1
vote
2 answers

How to display the clipboard copied text inside a toast

I'm new to Android. I want to display the copied coupon code. Here is code: ClipboardManager clipboard = (ClipboardManager) mCtx.getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText("Code",…
1
vote
2 answers

Pasting only numbers from the Clipboard

InputType of EditText in my application is number, only. How can I paste only numbers from clipboard to this EditText, if text in clipboard contains both numbers and letter?
Muhammadjon
  • 1,476
  • 2
  • 14
  • 35
1
vote
1 answer

How to make an app to copy text and send automatically to my networked database?

I am try to make Android app using clipboard manager Using this code- final ClipboardManager clipboard = (ClipboardManager) this.getSystemService(Context.CLIPBOARD_SERVICE); clipboard.addPrimaryClipChangedListener( new…
1
vote
0 answers

Google Translate Android listener

I came upon Google Translate on Android, and see that it seems to have Clipboard listener that runs forever(whenever something is copied, the app pops up). I have tried to replicate this on my project by putting clipboardListener on a Service which…
1
vote
1 answer

How to avoid copy/cut options in editText when it is in full screen mode in landscape orientation

I want to disable copy/cut options in editText, for this, I googled and found some good solutions from here How to disable copy/paste from/to EditText, but none of this solutions is working when editText is in full-screen mode in Landscape…
1
vote
1 answer

Capture Paste event of Clipboard

Is it possible to capture paste event from ClipboardManager? I am able to get copied data using method onPrimaryClipChanged() of ClipboardManager.OnPrimaryClipChangedListener. The question is in context to an app which uses Accessibility API.
1
vote
0 answers

How to monitor if user copies a text?

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…
Sayan Sil
  • 5,799
  • 3
  • 17
  • 32
1
vote
4 answers

getSystemService() not working on Adapter Class

I was trying to add onClickListener to a button inside a RecyclerView that wii copy a string but it says getSystemService(CLIPBOARD_SERVICE) is not available. public void onBindViewHolder(ViewHolder holder, int position) { …
1 2 3
8 9